Vaibhav
Vaibhav

Reputation: 7008

How can I run a python script on windows?

Can anyone please tell me an IDE for running python programs? Is it possible to run the program through command line?

Upvotes: 0

Views: 16148

Answers (5)

anmi
anmi

Reputation: 123

I tried to run a Python script with multiprocessing on windows. see this tutorial

It does not work on Windows, but on raspian it went very well. Thus I knew that it was a Windows problem. I installed cygwin and followed this tutorial Installing Python inside Cygwin.

After that I additionally installed numpy with the command easy_install numpy and now i can run python scripts with multiprocessing on windows (from cygwin).

Upvotes: 0

luc
luc

Reputation: 43146

PyDev and Komodo Edit are 2 nice Python IDE on Windows.

I also like the SciTE text editor very much.

These 3 solutions make possible to run Python scripts

Upvotes: 0

Boldewyn
Boldewyn

Reputation: 82814

Take a look at ActiveState's ActivePython. It's quite a nice implementation of Python on Windows. Another way is using Cygwin's Python port. These two are Python implementations. I don't use an IDE, I write my Python code in Notepad++.

To run a python program after saving it to C:\Users\vaibhav\Code\myscript.py:

  1. ActivePython: If I remember right, ActiveState updates the path correctly. So it should be a s simple as:

    • Press "start" in the task bar
    • In the search field search for "cmd"
    • In the appearing box navigate to your folder with the python script: dir Users\vaibhav\Code
    • call python myscript.py and you're done
  2. Cygwin: After installing Cygwin, you have a full-featured bash terminal on your Windows machine.

    • click on the Cygwin icon on your desktop
    • In the appearing window navigate to the folder with your python script: cd /cygdrive/c/Users/vaibhav/Code
    • type python myscript.py
    • e voila

Upvotes: 4

extraneon
extraneon

Reputation: 23980

I like the EasyEclipse for python distribution. You'd need to have python and java installed of course.

Upvotes: 0

argh
argh

Reputation: 931

IDE for running scripts? You can have any IDE you like, but if you need only to run python scripts you go like this:

python.exe pythonScript.py

Upvotes: 3

Related Questions