[Tutor] How to run a python script

Chris Warrick kwpolska at gmail.com
Sat Feb 20 14:34:18 EST 2016


On 20 February 2016 at 17:25, Erol Gericke <woodworm at cybersmart.co.za> wrote:
> I want learn Python programming. Many years ago I taught myself BASIC so I
> have some programming experience.
>
> I have  installed Python 2.7.11 and Notepad ++ on my Win 7 computer. I have
> also edited the PATH variable to include C:\Python27.
>
> However I am unable to run any scripts.
>
> When I type (into the COMMAND PROMPT window) python test.py or
> python C:\python27\test.py      I get SyntaxError: invalid syntax
>
> Until I solve this problem learning programming makes no sense.
>
> Can you please help me, I would appreciate your help.
>
> Thank you in advance,
> Erol Gericke.
> Somerse West. South Africa.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

Please paste the full error message, and your complete source code.
Also, make sure you are running the commands in the regular command
prompt window, and not in a Python-specific one.

Also, your scripts should not live in C:\Python27, because they might
conflict with other things.

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16


More information about the Tutor mailing list