Solved

run python script

Posted on 2013-12-21
4
415 Views
Last Modified: 2013-12-23
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
Comment
Question by:bachra04
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39733957
You do have to install Python.  http://www.python.org/
0
 
LVL 2

Author Comment

by:bachra04
ID: 39733973
I guess I need to install python but how to pass the file name to the script, is it through command line?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39733985
Yes, it would be.  Python doesn't have a GUI to run it.
0
 
LVL 28

Accepted Solution

by:
pepr earned 500 total points
ID: 39734830
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use of python .format to prefill  form. 5 63
how to split multiple lines delimiter : 8 80
Difference of import usage in Python 1 62
Python - desktop use 1 10
"The time has come," the Walrus said, "To talk of many things: Of sets--and lists--and dictionaries-- Of variable kinks-- And why you see it changing not-- And why so strange are strings." This part describes how variables and references (see …
Dictionaries contain key:value pairs. Which means a collection of tuples with an attribute name and an assigned value to it. The semicolon present in between each key and values and attribute with values are delimited with a comma.  In python we can…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now