Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

run python script

Posted on 2013-12-21
4
Medium Priority
?
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

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 84

Expert Comment

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

Accepted Solution

by:
pepr earned 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction On September 29, 2012, the Python 3.3.0 was released; nothing extremely unexpected,  yet another, better version of Python. But, if you work in Microsoft Windows, you should notice that the Python Launcher for Windows was introduced wi…
Sequence is something that used to store data in it in very simple words. Let us just create a list first. To create a list first of all we need to give a name to our list which I have taken as “COURSE” followed by equals sign and finally enclosed …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
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…

650 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