[Tutor] I cannot "run" any Python programs
Tamar Osher
emeraldoffice at hotmail.com
Wed Feb 22 23:49:39 CET 2012
Dear Joel: HI! Thanks for helping. When I use the Python shell, and navigate to the saved Python program, what happens is:
A second Python shell pops up, displaying the coding of the program (which is a tiny 'hello world' program). This is what is displayed in the second Python shell:
>>> print("Hello, World!")
In the first Python shell, when I type in what you requested, this is what happens:
>>> python myprogram.py
SyntaxError: invalid syntax
>>> python hello.py
SyntaxError: invalid syntax
>>>
I am not able to use the Python shell to find the saved Python program. I am able to use Notepad++ to locate the saved Python program, but I cannot run the program. I cannot do anything with the command prompt (black box).
I request help to figure out how to run Python programs. Thanks for helping me!
>From Your Friend: Tamar Osher
Email: EmeraldOffice at hotmail.com
> Date: Wed, 22 Feb 2012 17:33:22 -0500
> Subject: Re: [Tutor] I cannot "run" any Python programs
> From: joel.goldstick at gmail.com
> To: emeraldoffice at hotmail.com
> CC: tutor at python.org
>
> On Wed, Feb 22, 2012 at 5:23 PM, Tamar Osher <emeraldoffice at hotmail.com> wrote:
> > Hi. I need help.
> >
> > I have installed Python 3.2.2 and have been using IDLE (the "Python shell")
> > to type and save a Python program, such as 'Hello World'.
> >
> > However, the command prompt (the black box) will not allow me to type a
> > Python program or to "run" a Python program. So I tried to run a Python
> > program using Notepad++, and while I am able to type it, I am not able to
> > save it.
> >
> > I am not able to "run" any Python programs. I have read so much about
> > Python, and have researched the situation in detail, and have experimented
> > with various "environmental variables" and user/system paths. I need help
> > to correct the situation..
> >
> > Can someone please help me? Thanks for helping. I look forward to hearing
> > from you.
> >
> > From Your Friend: Tamar Osher
> > Skype: tamarosher
> > Email: EmeraldOffice at hotmail.com
> > Message Phone: 011- 1- 513-252-2936
> > www.HowToBeGifted.com - marketing communication, web design, and much more
> >
>
> run cmd to get to the shell.
> in the shell, navigate to the directory where you have saved your file.
>
> type:
>
> python myprogram.py
>
> Tell us what happens.
>
> >
> >
> >
> >
> >
> > _______________________________________________
> > Tutor maillist - Tutor at python.org
> > To unsubscribe or change subscription options:
> > http://mail.python.org/mailman/listinfo/tutor
> >
>
>
>
> --
> Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120222/c8ad5bf5/attachment.html>
More information about the Tutor
mailing list