[Tutor] Running Existing Python
Justin Bonnell
jwbonnell5 at gmail.com
Sat Feb 26 07:49:37 CET 2011
Okay. When I try to run the script from the terminal, it still doesn't work. Here is a screenshot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2011-02-26 at 12.47.02 AM.png
Type: image/png
Size: 30616 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20110226/3cb144b7/attachment-0001.png>
-------------- next part --------------
What am I doing wrong?
On Feb 25, 2011, at 6:46 PM, Alan Gauld wrote:
>
> "Justin Bonnell" <jwbonnell5 at gmail.com> wrote
>
>> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
>> Type "copyright", "credits" or "license()" for more information.
>
> The >>> prompt means you are already inside Python.
> You can type Python commands at the >>> prompt, things like
>
>>>> print "Hello"
>
> But you cannot ruin a program from inside the >>> prompt (well, you can, but its more complicated than sane people want to bother with! :-)
>
> You run a Python script from the OS Terminal prompt:
>
> $ python hello.py
>
>> Shouldn't I be able to run hello.py from the IDLE interpreter?
>
> You can't run it from the >>> prompt in IDLE but....
> What you can do is open the file for editing and then run that file using the menu commands, then the output will show up in the interpreter window.
>
I get how to do this now^^
> HTH,
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list