Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
12  
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
add comment

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.

2 Answers

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
add comment

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
add comment

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