Skip to main content
gamedev.net
🔒 Locked

Python won't save?

Started by The Ice Master Aug 23, 2005 at 8:36 AM 4 replies 950+ views
Original Post
The Ice Master
The Ice Master
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.
samuraicrow
samuraicrow
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]
Tyr
Tyr
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
python

and that should run it. That shouldn't be a problem with the pygame ones, though, so I'm a bit perplexed.
Zaris
Zaris
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.
The Ice Master
The Ice Master
It still won't work.

My guess: My computer just doesn't like to share.
Kylotan
Kylotan
Perhaps PythonWin is broken. I suggest you try another editor.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.