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!

user233699
  • 31
  • 3

1 Answers1

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.

Noelkd
  • 7,686
  • 2
  • 29
  • 43
  • 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... – user233699 Mar 13 '14 at 22:17
  • 1
    Found the solution! http://stackoverflow.com/questions/4810537/how-to-clear-the-screen-in-python I had to change the "clear" to "cls" in the script for it to work on windows. Thanks all! – user233699 Mar 13 '14 at 22:21