Jump to content
  • Advertisement
Sign in to follow this  
The Ice Master

Python won't save?

This topic is 4830 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

I found this tutorial, and it wants me to type this program and run it. I am using PythonWin. When I finish, I go to save as, and save it. When I go to run it, its not there. I tried saving it as firstpython.py, but that didn't work either. Whats going on?! I tried using the IDLE thing too, but when I save that, it just saves it to a file. Oh yeah, I have this other problem. EDIT: I went to the Python game making site, and they have a long tutorial and stuff to learn how to make python games. You have to download it, and now it is sitting here. When I try to open it or any of the examples, the Python command line opens, and then closes right away. This is the same thing that happened when I told my computer to open that file with Python.

Share this post


Link to post
Share on other sites
Advertisement
Have you tried running it from Idle? It will list errors in the Python shell window.

As for tutorials on the PyGame site. Keep in mind that some of them were designed for Python 1.5 and PyGame versions prior to 1.7. What I would recommend is downloading Phil's Pygame Utilities and going through the tutorials there. Keep in mind that you have run the build script in the documents directory to build the HTML version of the documentation and update the path.

EDIT:

I figured out your problem with Idle. You need to open a new window before you type your Python script in. Try loading your file back into python and see if it opens a new window and run it from there.

[Edited by - samuraicrow on August 23, 2005 9:59:42 AM]

Share this post


Link to post
Share on other sites
Well, saving your program to a file is the normal thing to do. Python is an interpreted language, so it runs your programs in source code form (although you can compile them to bytecode if you want). You'd be best typing in your programs and running them from your IDE for now (by pressing F5 in IDLE).

As for the console flashing up and then disappearing, try running your programs from the command line. Open up the command prompt (I assume you're using Windows), type in

cd <whatever directory your program is in>
python <whatever your program file is called>

and that should run it. That shouldn't be a problem with the pygame ones, though, so I'm a bit perplexed.

Share this post


Link to post
Share on other sites
You can also right click the program and it give you the option to open with the IDE; choose that option and it will open; other wise it will just run the script.

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!