ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.