• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

run python script

Hi guys,

I'm new to python scripting
I want to run and try this one on windows 7 :

http://pastebin.com/6fSKSJVv#

any help ?

do I have to pass any parameter ?
0
bachra04
Asked:
bachra04
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
You do have to install Python.  http://www.python.org/
0
 
bachra04Author Commented:
I guess I need to install python but how to pass the file name to the script, is it through command line?
0
 
Dave BaldwinFixer of ProblemsCommented:
Yes, it would be.  Python doesn't have a GUI to run it.
0
 
peprCommented:
Actually, when you install Python 3.3, it installs Python launcher for Windows (see http://docs.python.org/3/using/windows.html#launcher). The installer also creates the associations with the .py and .pyw extensions. Then you can add the first line inspired by UNIX script, and the wanted version of Python interpreter will be used for launching the script. Double clicking on the script icon can be used to launch it. Try the following:
#!python3
print('Hallo World!')
s = input('Press Enter to finish')

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now