• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • 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

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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