[Tutor] Trouble running Python on Windows Vista

Tom Avos tomavos at yahoo.com.ar
Thu Jun 14 21:19:36 CEST 2012


Yes, If I open the file from the IDLE and then I press "f5" it works, but I want to know why it does not work if I write the filename after the ">>>" prompt . That way is much more handy, I would like to make it work.
 
 

________________________________
 De: Kwpolska <kwpolska at gmail.com>
Para: Tom Avos <tomavos at yahoo.com.ar> 
Enviado: jueves, 14 de junio de 2012 16:01
Asunto: Re: [Tutor] Trouble running Python on Windows Vista
  
On Thu, Jun 14, 2012 at 8:54 PM, Tom Avos <tomavos at yahoo.com.ar> wrote:
> De: Tom Avos <tomavos at yahoo.com.ar>
> Para: "Flynn, Stephen (L & P - IT)" <Steve.Flynn at capita.co.uk>
> Enviado: jueves, 14 de junio de 2012 13:19
> Asunto: Re: [Tutor] Trouble running Python on Windows Vista
>
> Great! You're right.. It works from the Command Line :-)
>
> So, how should I call it inside the IDLE?? ... If I write ">>> triangulo.py"
> I get the "NameError"
>
> Thanks again.
>
> De: "Flynn, Stephen (L & P - IT)" <Steve.Flynn at capita.co.uk>
> Para: Tom Avos <tomavos at yahoo.com.ar>
> Enviado: jueves, 14 de junio de 2012 13:00
> Asunto: RE: [Tutor] Trouble running Python on Windows Vista
>
> Looks like (from the “>>>” prompt) that you’re still inside IDLE when you
> try to fire up the interpreter. This is how one would kick off the python
> code from the command line.
>
> S.
>
> From: Tom Avos [mailto:tomavos at yahoo.com.ar]
> Sent: Thursday, June 14, 2012 4:56 PM
> To: Flynn, Stephen (L & P - IT)
> Subject: Re: [Tutor] Trouble running Python on Windows Vista
>
> Hi Stephen,
> I followed your advice, but still no luck... I get the following error
> ("triangulo" highlighted):
>>>> python.exe triangulo.py
> SyntaxError: invalid syntax
>>>>
> Best,
>
>
> De: " Flynn, Stephen (L & P - IT)" <Steve.Flynn at capita.co.uk>
> Para: Tom Avos <tomavos at yahoo.com.ar>
> Enviado: jueves, 14 de junio de 2012 12:36
> Asunto: RE: [Tutor] Trouble running Python on Windows Vista
>
>
> Hi Tom,
>
>
> “python.exe triangulo.py”
>
>
>
>
> S.
>
>
> From: tutor-bounces+steve.flynn=capita.co.uk at python.org
> [mailto:tutor-bounces+steve.flynn=capita.co.uk at python.org] On Behalf Of Tom
> Avos
> Sent: Thursday, June 14, 2012 4:30 PM
> To: tutor at python.org
> Subject: [Tutor] Trouble running Python on Windows Vista
>
> Hi there,
> I'm learning Python. I have to work with a Notebook running Widows Vista
> Home Premium.(have no other choice)
> It works fine when working in Interactive Mode or by  Opening a .py file
> from the IDLE and then running it by pressing F5, but I can not run .py
> files by invoking them from the prompt (neither from IDLE nor Dos Command
> Line);
>
> Every time I try to do this I get the following error:(In this case I'm
> tryig to invoke triangulo.py saved in C:\python27);
>
>>>> triangulo.py
> Traceback (most recent call last):
>   File "<pyshell#3>", line 1, in <module>
>     triangulo.py
> NameError: name 'triangulo' is not defined
>>>>
>
> The same happens for every file I want to run by calling them from the
> prompt, although if I double click on any .py file it runs ok.
>
> I've installed Python as follows:
>
> I've downloaded the Python 2.7.3 Windows Installer from
> www.python.org/download/.
> Once I've got it I run the installer and Python was installed on
> C:\Python27, and I've added Python to the my directory by doing set
> path=%path%;C:\python27.
>
> Any ideas will be very welcome :-)
> Thanks in advance for your attention.
>
>
> Click here to report this email as spam.
>
> This email and any attachment to it are confidential.  Unless you are the
> intended recipient, you may not use, copy or disclose either the message or
> any information contained in the message. If you are not the intended
> recipient, you should delete this email and notify the sender immediately.
>
>  Any views or opinions expressed in this email are those of the sender only,
> unless otherwise stated.  All copyright in any Capita material in this email
> is reserved.
>
>  All emails, incoming and outgoing, may be recorded by Capita and monitored
> for legitimate business purposes.
>
>  Capita exclude all liability for any loss or damage arising or resulting
> from the receipt, use or transmission of this email to the fullest extent
> permitted by law.
>
>  This message has been scanned for malware by Websense. www.websense.com
>
>
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>

Open the file in the IDLE editor and press F5.

-- 
Kwpolska <http://kwpolska.tk>
stop html mail      | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16   | Arch Linux x86_64, zsh, mutt, vim.
# vim:set textwidth=70:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120614/0b827ea8/attachment.html>


More information about the Tutor mailing list