problem with python saving
hello,
i am having trouble saving my simple program this is what i wrote x=raw_input("enter name:") print "hey" + x raw_input("Press<enter>") and everytime when i save this i go to file save JAPANBOY.py move to desktop and when i open it there's the black screen and it dissapears in less than a second. does anybody have any idea what im doing wrong? by the way im using python 3.2 and the video that im watching it's using an different version. |
I assume you're doing this in windows? Try running it from a command
line. I don't know how to make a desktop object in windows that will open a shell and then run your script. Cheers, Tink |
It opens the script in a terminal, the script ends, and the terminal closes. Running it from a terminal will fix this (these commands are for Linux):
Code:
cd ~/Desktop |
The problem is your code - raw_input is no longer in python 3. Change raw_input to input in the code and it should work. This is causing a program error which you are not seeing as you are not running the program from the command prompt. This is just quickly opening and closing a terminal session. It's best to run python from the command prompt so errors are shown. When the code is fixed this should work by just launching with a double click.
|
All times are GMT -5. The time now is 05:20 PM. |