<div class="gmail_quote">On 24 September 2012 17:41, Benjamin Fishbein <span dir="ltr"><<a href="mailto:bfishbein79@gmail.com" target="_blank">bfishbein79@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>

<br>
logout<br>
<br>
[Process completed]<br></blockquote><div><br></div><div>Are you using the python launcher? Or are you opening a terminal and then typing 'python myscript.py'?</div><div><br></div><div>Tell me if the following steps work for you:</div>
<div><br></div><div>1) Open the terminal - you can find it under Applications/Utiltiies (or if you just type 'terminal' in spotlight). You should see something like:</div><div><div>Last login: Tue Mar 6 17:21:36 on console</div>
<div>Welcome to Darwin!</div><div>ibook:~ Alex$</div></div><div><br></div><div>2) Type 'cd name/of/folder' and hit enter to move into the folder that contains your Python script.</div><div><br></div><div>3) Type 'python myscript.py' and hit enter to run the script called 'myscript.py'.</div>
<div><br></div><div>Oscar</div><div><br></div><div>About the terminal:</div><div><a href="http://macapper.com/2007/03/08/the-terminal-an-introduction/">http://macapper.com/2007/03/08/the-terminal-an-introduction/</a></div>
</div>