From: tutor-bounces+ramit.prasad=jpmorgan....@python.org [mailto:tutor-bounces+ramit.prasad=jpmorgan....@python.org] On Behalf Of Dinara Vakhitova Sent: Tuesday, September 13, 2011 1:55 PM To: Wayne Werner Cc: tutor@python.org Subject: Re: [Tutor] cmd window
Thank you a lot, it helped! 2011/9/13 Wayne Werner <waynejwer...@gmail.com<mailto:waynejwer...@gmail.com>> On Tue, Sep 13, 2011 at 12:57 PM, Dinara Vakhitova <di.marvell...@gmail.com<mailto:di.marvell...@gmail.com>> wrote: Hello, Excuse me for my stupid question, but I'm an absolute beginner in programming. I just would like to know what should I do in such case: when I run my program by clicking on the file itself, rather than from IDLE, the cmd window disappears just immediately after the output printing, so that I can't even see it. The solution must be very simple, but I can't find it in tutorials... This is mainly because in later versions of Windows (XP onward, I believe) they changed a setting so that the command window would close after a program has executed. There are probably some more complicated settings to fix it on a global basis, but you'll find that most people add this line to the end of their programs: raw_input("Press <Enter> to continue") # Use input() with Python 3.x HTH, Wayne -- Yours faithfully, Dinara Vakhitova You can also run from command line. Start->run-> type "cmd" ->hit enter -> navigate to directory "cd c:\directory\with\python\filename.py" (substitute the path you need) -> run script "python filename.py" Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor