Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some Python scripts in Linux. How can I make those scripts so that windows user can use and execute them?

share|improve this question

closed as off topic by Michael Mrozek Mar 25 '13 at 20:16

Questions on Unix & Linux Stack Exchange are expected to relate to Unix or Linux within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Python runs on Windows just like on Linux; you don't have to do anything. Are you asking how to package Python scripts as Windows executables? That's probably an SO question – Michael Mrozek Dec 14 '10 at 6:20

Hmm, are they not executable at the current moment? Are there any errors? What's wrong?

First of all: does Windows even have Python installed? Open up a Command Prompt and type in python. If you get into a Python interpreter shell, you do have it.

Next, to run the files, you have to cd into their directory and just run python file.py.

If you were to give more details, maybe I could help a bit more?

share|improve this answer

It depends... How that Python script was written. At some of the cases You can avoid the incompatibility using "os.*" methods and constants. Most of those are rewritten to some different environments.

Those handy methods includes most of these cases:

  • file and directory structure management
  • processes management
  • environment variables management
  • file handlers management
  • etc...
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.