Jump to content
  • Advertisement
Sign in to follow this  
Graiskye

Working with Python for the first time

This topic is 4361 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have just started to explore Python a little. My question concerns working with it, I have the original Python 2.43 installed, and it seems all I have available to me is a command line editor, mind you I know very little about it, so? Anyways is there any other GUI's,(or is it IDE ??), or is the command line type all that is available to me. Its very basic and has no editing capabilities. I cannot cut and paste code in, or nothing, so I imagine there has to be something a little better. Edit: 'Kay I just found the GUI Idle, This allows me to cut an paste and do other normal editing functions. Anyone know of any others? [Edited by - Graiskye on August 12, 2006 2:11:06 AM]

Share this post


Link to post
Share on other sites
Advertisement
You can also use Eclipse with the PyDev plugin, which is free. There's also Wing, which is pretty nice (it has the best code-completion of all of them, and very good keyboard shortcuts), but it's commercial like Komodo.

This site has a more comprehensive list of IDEs:
http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

Share this post


Link to post
Share on other sites
Thanks everyone. Most appreciated. One thing I have trouble with is just figuring out how to work with python. You have to understand I'm very new to it all, and I am kinda confused by the process of getting Py programs to run. I can get a simple Hello World tester to run when using the command line, but not when I use the GUI, thats when I get lost kinda.
So the big question is, how, once I have written the code using the GUI(Idle for instance), how to I transfer that code. Basically how do I get it to work.
I have been scouring a bunch of decent articles and tutorials but so far I havent been able to solve this one. I like to try to solve problems myself, but I'm stumped, I tried all yesterday to find a solution but alas.
One other thing that would help is having a better understanding of the terminology, things like shell, IDE, porting, etc... all these terms I read all the time, but I dont really know the meanings, any good FAQ's geared a little more towards the vocabulary of programming would be a big help.
Regardless, thanks for everything so far. Grais.

[Edited by - Graiskye on August 12, 2006 8:49:25 PM]

Share this post


Link to post
Share on other sites

To run a program from within IDLE, just hit F5 with the window that contains your code focused. From the Windows GUI, just double-click on the icon: Python should have registered itself as the handler for .py (python source, console), .pyw (python source, no console), .pyc (compiled bytecode) and .pyo (compiled and optimized bytecode) files. There is no "transfer" needed. The file you have written is the program.

Keep in mind that any console-mode application will spawn a console window when starting up, and destroy it when it ends. This often trips beginners who see their application just "flash" a window too quickly for them to appreciate what the program does.

Quote:
One other thing that would help is having a better understanding of the terminology, things like shell, IDE, porting, etc...


For most terms, you can go to Google and type: define: shell or define: IDE.

Share this post


Link to post
Share on other sites
I start up the Pythonwin IDE(same as original pythons Idle), and I try to run a program, for instance the first program they give in the Dive into Python tutorial....
I tried to post a screenie but it didnt work, so if you just clik the link you'll see what I am seeing when I try to run a program



Anyways everyone just tells me you just run the program from in Idle, but I get this run script thing and I dont know what to do. Nothing I have read mentions this happening, but I have yet to get a program to work, I cannot understand why no documetnation mentions this? Like it doesnt exist but it does? Theres not really much help available for python so Im beginning to feel quite hopeless, for three days I have searched, and searched, and searched for an answer to this but nothing.
EDIT: well I guess links dont work either ??? What up with that? Anyways if you'll copy and paste the link given youll see what I see.

PS Before someone suggest I try the original Python, I allready have, same exact thing, little box opens up and asks me what scripts I want to run ?


Edit by Fruny: fixed image link: we use standard HTML.

Share this post


Link to post
Share on other sites
It's asking you the name of the file that contains the program you wish to run (some other shortcut might just execute the 'current' program), and if you wish to pass it command-line parameters.

I don't use ActivePython.

Share this post


Link to post
Share on other sites
And how am I suppose to determine that,why does none of the documentaion mention this critical step in running a program ? BtW Fruny, the exact same thing happens when I use Idle, also thanks for your patience, and help so far ?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!