Getting Started Guide For The Absolute Beginner (UPDATED!)

Phew! That’s a relief! I’m glad it worked out for you. Just a question, does Pyscripter need wxPython as well? Cause I didn’t see any mention of it on the Pyscripter site.

I already have wxPython installed because of SPE, but do you know if Pyscripter can run without it? If it can, then it makes downloading and setting up Pyscripter a little bit easier than setting up SPE.

I’d like to add info about Pyscripter to the guide, but I want to be sure I’m telling people how to set it up properly before I do.

Cheers

I uninstalled PyScripter and Python deleted both folders and reinstalled both without wxPython. It appears that PyScripter works fine without wxPython, and Panda3D is still running strong!!

wow dude this is a good starting up tut! im a noob to pure coding engines and python but this engine seems really cool!

How do you get Pyscripter to run without arguments?

dudes we should update the wiki

As a thought…

I’ve just set up Panda for my son to tinker with on his Windows PC. To make his life easier (he’s not comfortable using a DOS window yet) I added both PYPE and PPYTHON to his Send To menu, meaning he can simply right click any .py file and either edit it or run it.

For those that might not know how to do this.

  1. Make sure you know where PPYTHON.EXE and PYPE.EXE (or your alternative editor) are located. PYPE.EXE will be inside the pype folder wherever you unpacked it (I then copied the folder to the root of C: to keep it tidy) and PPYTHON.EXE is inside the python folder in your panda folder (usually C:\Panda3D-1.4.1\python).

  2. Open an explorer window to each one, working from my computer and hunting through.

  3. Now open an explorer window to your C: and go to the ‘Tools’ menu and select ‘Folder Options…’

  4. Now click on the ‘View’ tab and in the Hidden files and folders part of the list, make sure that ‘Show hidden files and folders’ is selected. Click OK to confirm this setting.

  5. Now open up the ‘Documents and Settings’ folder and then the folder for your user name.

  6. You should now see a ‘Send To’ folder that looks slightly transparent. Open this folder.

  7. Using the right hand mouse button, drag the PPYTHON.EXE file to the ‘Send To’ folder and let go. Select ‘Create Shortcuts Here’ and you should have a new shortcut. Rename it to simply ‘ppython’ to make it tidier.

  8. Do the same for PYPE.EXE

  9. To keep things tidy, go to the ‘Tools’ menu of the ‘Send To’ window and select ‘Folder Options…’

  10. Now click on the ‘View’ tab and in the Hidden files and folders part of the list, make sure that ‘Do not show hidden files and folders’ is selected. Click OK to confirm this setting.

  11. Close the ‘Send To’ window

Now, whenever you want to edit a .py file, simply right-click it and use the Send To menu to send it to Pype. When you want to run it, right-click it and use the Send To menu to send it to ppython.

Obviously, you have more control over what you do if you use the command prompt, but for quick and simple coding and testing, this should speed things up for you.

Lol

I’ve been using .bat and command prompt for ages and never though (nor know how to )to use this SendTo options.
This looks suits for code that works already :slight_smile:

Thanks for the input…

2 parts aren’t comfortable for long term use (for me) :

  1. By creating a direct shortcut, which always holds absolute path of the executable, you would need to re-point the shortcut next times you install new version, either Panda or PyPE. Unless you always install them in exactly the same location (without any version number added to the folder name).

  2. why do you use Send To menu ?
    Do you know that you can add the open/run and edit command directly to the right-click menu ? Moreover, you can set the default command for open/run, which only need pressing Enter to execute the .py.

Haven’t I covered [that] already ?

Umm

  1. Yes, the shortcut holds an absolute path of the executable, but if you should install a new version, you can simply remove those shortcuts and make new ones really easily. A simple delete and new drag.

  2. I used ‘Send To’ rather than messing with the contextual right click menu options because it’s quicker and easier and my eight year old son was getting impatient.

As an aside, this topic started with someone trying to help people past the initial hurdle and fear of starting with Panda3D. Every reply was supportive and thankful and then you jumped in.

Please be careful of how you phrase your posts, you are likely to trample over sensitive feelings and cause more harm than good by making some people scared to post.

Ooh I’ve just discovered that PyPE can run scripts by itself. I had to add ppython to the Options->Shell Options menu and make sure it was selected, but now I can run a script from the same interface I edit it in and even have a console window.

I wonder what else it can do…

Are you referring to file > run ?

anyway I like pyPE its fast to load and easy enough and it seems to be nicely featured,but Idont like not having a ‘x’ on tabs to close them…a minor NIT I guess but it makes it easy to close instead of having to Cntrl-W :wink:.matter of taste I guess :wink:

cheers
nl

Yup, File->Run current file

sorry for interrupting, just a side note :
my horrible post was just a pure expression of the shocked me, nothing more, nothing less. So if it’s horrible, that’s how I felt. Guess why ? The answer is already there in the post. The rest of it was simply chain reaction inside me.
take it easy.

my short conclusion are :

  1. what’s not harmful these days ? Don’t be afraid of harmful things.
  2. put the fear off your daily menu. Fear is the biggest obstacle in life. People who always have fear in the menu would never go anywhere.
    I strongly believe that there is often more to be learned from failure than there is from success if we just take the time to do so.” - Henry Ford

I’m using eclipse and eclipse plugins “pydev” and it’s working very well.
you can run your script as well on this ide.

  1. go and download eclipse-ide - before install the eclipse-ide you should have java runtime or sdk installed.
    after downloading than install it.

2.now we have to install the pydev plugins
run the eclipse-ide. than goto Help->Software Updates->Find and Install…
a dialog open choose SEARCH FOR NEW FEATERS TO INSTALL and click next.
than click the button NEW REMOTE SITE … and type in for thee name PYDEV and for the url “http://pydev.sourceforge.net/updates/” than click ok.
so it will download pydev and after install it to the ide.
when finish you have to restart the ide.

  1. setting up panda3d
    goto Window->Preferences…
    find pydev and click in the +
    and than click on the “Interpreter Python”
    on the rightside you click on the NEW button where you should link to the path of panda3d ppython.exe
    than you can end up with the OK button.

  2. how to run the script
    goto the RUN menu and choose the OPEN RUN DIALOG…
    on the left you click double on PYTHON RUN
    on the left
    goto the Arguments tap and choose for " Interpreter:" the PPYTHON.exe
    than Run
    that is
    hope to help someone with this guiding.

sorry for my english.
[/u]

check :
have you brows to the project ?
have you brows the main module to your script?

if you have any question, please ask .
so if i have time i would make a visual guiding setting up eclipse and panda3d

cotoc

Just wanted to say thanks alot for the guide. I’m brand new to Panda3 and still rubish at using it but hopefully if i can follow all your guide things will change. Do you know of any other good sites to learn more?

D M
:smiley:
Cheap Mortgages[/url]

If its about plain python I can suggest google with “python beginner guide” - I can’t recommend any since I searched for one in my native language (what is not english)

Regards, Bigfoot29

I’m attempting to follow the guide in order to get started with Panda, and have managed to get as far as getting the IDE up and running.

Unfortunately, when I attempt to run the code given under “Write your first script”, the output runs through a number of import lines and then produces an error message, specifically, the following:

" File “C:\Panda3D-1.5.2\pandac\extension_native_helpers.py”, line 35, in Dtool_PreloadDLL
imp.load_dynamic(module, os.path.join(target, module + “.dll”))
ImportError: Module use of python25.dll conflicts with this version of Python."

One place in which I deviated from the described method of setting up the IDE came as a result of my finding that the directory structure of my Panda download would appear to be a little different to that that was used in the tutorial - I found the panda.pth file in \python, I believe, instead of \bin. In light of this, perhaps the directories given for inclusion in the version copied to the Python24 folder are out of date…?

(Since the second line of each import line seems to be red, I include one here just in case this colour indicates an error that I’m not noticing in the text; I’m fairly confident, however, that these are not error reports.
“File “C:\Panda3D-1.5.2\direct\src\directbase\DirectStart.py”, line 3, in ?
from direct.showbase import ShowBase” )

you cant use python2.4 with panda3d compiled for python2.5 (as panda 1.5.2 is) Use the python that came with panda3d not your own.

[edit 2]

MWAHA! I have SPE working! :slight_smile:

It turns out that wxPython 2.6.3.3 has a Python 2.5 version, and, guessing that it might be similar enough to SPE’s desired 2.6.1.0 (I think that it was), I decided to give it a shot. Lo and behold, it seems to have worked, and I’ve managed to run the first-step “grey screen” Panda app! :slight_smile:

[/edit 2]

Hmm… I’ve tried to do that, but am having trouble getting SPE to run under 2.5.

Specifically, when I attempt to run it, it seems to return immediately, producing no output or window.

Run from through cmd (using the command that the shortcut provides, ‘python\pythonw.exe “python\lib\site-packages_spe\SPE.py”’), there seems to be no output, and no error message, and back at the command prompt - as though pythonw had run, produced no output, and returned, all quite quickly. :confused:

It seems to work when done using an installation to the 2.4 directory, so I was guessing that the problem lay with wxPython. SPE reported that it doesn’t work with a relatively recent version of wxPython (the version for 2.4, at least - I haven’t tried the version for 2.5), and the version for which it was designed (2.6.1.0, I think) doesn’t seem to come with a 2.5 version.

[edit]

Some looking around the “Installation” forum (in which I now realise that I should perhaps have originally posted this problem, although it’s not really a Panda installation problem as such, I don’t think.) revealed to me the presence of the IDLE editor, which seems to come with Python (I seem to have a copy in both the Panda-distributed version and the 2.4 version that I downloaded). Using this I have, at last, managed to run the first-step “grey window” Panda app.

I at least now have an IDE, although from what I’ve seen of both (not terribly much thus far, admittedly) I think that I’d prefer to use SPE. Hence, my question still stands. :confused:

I do have a little more news, however, due to having attempted to run the SPE python file through IDLE. It seems that it objects to running with a Python 2.4 version of wxPython. Unfortunately, the version of wxPython that SPE would seem to have been made for doesn’t seem to have a Python 2.5 version, and using the more recent version of wxPython seems to produce errors. :confused: