HI everyone. How do I run a multi line program in IDLE shell interpreter ? I know I can ctrl+j to make a new line for starters....
When you type your program into IDLE, just hit F5 to run it.
in the shell select the New menu item from the File menu ... File|New That will open and editor window where you can write multiline scripts/modules/programs from within the editor window F5 will run the program and the results will be displayed in the shell window. - be sure to save the files with a .py extension. Python modules/files are just plain text and any text editor will work, but you might as well just use the IDLE editor - it has syntax highliting and checking and code completion built in. http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/execution.html http://docs.python.org/2/library/idle.html
The IDLE shell interpreter will let you do multiline just by typing in the lines. However, that is problematic because if you make a mistake, it can be harder to fix. That is why bwCA is talking about saving it as a file and why both bwCA and eSpeX are talking about running that file with F5.
Thanks!
Join our real-time social learning platform and learn together with your friends!