Support Forums
How to Run a Python Script..? Need Help - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32)
+---- Thread: How to Run a Python Script..? Need Help (/showthread.php?tid=25897)



How to Run a Python Script..? Need Help - aloneak - 04-07-2012

Today i have started to learn python

i have created a simple script with notepad ++ like below

[Image: Et5pf.png]

after that i want to run it through python terminal but it showing error like this

[Image: kWp0a.png]

can you please give me a detailed tutorial how to run python script using python 2.7 and notepad ++


RE: How to Run a Python Script..? Need Help - Rhynorater - 04-07-2012

What version of Python are you using?


RE: How to Run a Python Script..? Need Help - aloneak - 04-07-2012

(04-07-2012, 09:25 AM)Rhynorater Wrote: What version of Python are you using?

python 2.7
windows 7 ultimate 32 bit
notepad + +
above is my current stuff Smile


RE: How to Run a Python Script..? Need Help - AceInfinity - 04-07-2012

Add python.exe directory to an environment variable, then call it and pipe the script to the first argument. Example:

Code:
python "python/dir/scipt/location/testscript.py"

Unless your CLI is already running in the directory of the script:

Code:
python script.py



RE: How to Run a Python Script..? Need Help - Rhynorater - 05-03-2012

You could always just run it in IDLE. Just hit F5 when you are in the screen to type stuff.


-Rhynorater.