1

I have a Python script and I'm trying to run it from Windows or some online Python interpreter. I would like my friend to test it but he doesn't have linux.

The conflict here is that I have modules such as "import os" in the script that is only native to the bash environment. So how can I get my friend to run my .py script in Windows?

Thanks!

2
  • You need cygwin project. Commented Mar 13, 2014 at 19:12
  • FYI: this has nothing to do with bash Commented Mar 13, 2014 at 20:43

1 Answer 1

2

The cool thing about python is that you friend should be able to run your script with little to no change(hopefully), to quote the python os docs

This module provides a portable way of using operating system dependent functionality.

If your friend did have an issue you might have a another question to ask.

Sign up to request clarification or add additional context in comments.

2 Comments

Okay so I downloaded Python for Windows and I tried running the script. I have everything running fine except these two commands: os.system ("clear") os.system ("sleep 2") Which is why I think it's related to bash because those are bash commands...
Found the solution! stackoverflow.com/questions/4810537/… I had to change the "clear" to "cls" in the script for it to work on windows. Thanks all!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.