[Tutor] running program in terminal
Oscar Benjamin
oscar.j.benjamin at gmail.com
Mon Sep 24 19:02:30 CEST 2012
On 24 September 2012 17:41, Benjamin Fishbein <bfishbein79 at gmail.com> wrote:
> Hello. I can run programs in IDLE but when I try to do it in a terminal or
> with textwrangler, it usually just logs out and says it's completed, but
> the program hasn't been run. This is particularly so when the program uses
> urllib. I'm using OS X.
>
> logout
>
> [Process completed]
>
Are you using the python launcher? Or are you opening a terminal and then
typing 'python myscript.py'?
Tell me if the following steps work for you:
1) Open the terminal - you can find it under Applications/Utiltiies (or if
you just type 'terminal' in spotlight). You should see something like:
Last login: Tue Mar 6 17:21:36 on console
Welcome to Darwin!
ibook:~ Alex$
2) Type 'cd name/of/folder' and hit enter to move into the folder that
contains your Python script.
3) Type 'python myscript.py' and hit enter to run the script called
'myscript.py'.
Oscar
About the terminal:
http://macapper.com/2007/03/08/the-terminal-an-introduction/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120924/f914ee81/attachment-0001.html>
More information about the Tutor
mailing list