• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 492
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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