2009/8/6 Joshua Harper <joshharpe...@gmail.com> > Ok, so I am trying to learn python, and I am reading many tutorial type > things and I am kind of stuck with implementing some of the code... so for > example the tutorial says "*To get the examples working properly, write > the programs in a text file and then run that with the interpreter*" > Alright...simple enough so I wirte the example program: > > x = input("Please enter a number: ") > print "The square of that number is > > I save this as a .py and Open With>python.exe. OK, so that gives me the > terminal ansking me to enter a number, I enter a number and click enter and > then it prints in like half a nanosecond and the cmd line window closes. I > want to know how to have the window stay open so that, in future scripts I > may be able to actually see what was printed. I talked to my friend and he > said that he has the same problem...anybody?...help??? > > It closes because it is finished.
If you want to see the result, you could either: - Place another input("") after the print statement. - Run the program from the command prompt (in which case you will probably need to set the path) -- Michael Connors
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor