Differences between windows and ubunto python scripts

2.3k views Asked by At

I was having a little problem. My script works fine in Linux Ubuntu

When it came to Windows I fell short. my script uses import argparse so I need to pass arguments via cmd but I was getting errors. I figured out the answer while typing this.

For anyone looking for answers you just do this:

For me it was something that had to do with toying with archives

     python file.py  Archive.zip -c (--compress) test1.txt

This action will compress test1.txt in Archive.zip

I feel stupid to think that there is a big difference between command line in Windows and Linux when handling python.

Keep in mind to know where your arguments should be *

I Changed the places between -c and the name of the archive by mistake and I was typing python3 instead of python for a while like an idiot.

  • So the biggest difference is python3 for Linux and python for Windows.

  • Is there anything else different between Linux and Windows when handling python scripts?

turned out everything is here: https://docs.python.org/3.3/using/windows.html

and here: https://docs.python.org/3.3/using/unix.html

Anyone interested check those links to get a better idea there was no need for my question after all :(

0

There are 0 answers