python 2.7.12 on Linux behaving differently than on Windows

Michael Torrie torriem at gmail.com
Wed Dec 7 11:53:42 EST 2016


On 12/07/2016 08:48 AM, BartC wrote:
> I would prefer that the program "t" can be invoked exactly the same way 
> under both systems. I don't want different instructions for Linux, or 
> for the user (of my language) to have to write two lots of code, as that 
> is my job...

Ahh now we come to the crux of your argument.  You want all potential
platforms to conform to your own idea of what is normal.  And indeed
this is the actual issue that started the original thread.  But that's
not the way it works for any platform.  I develop a lot of code on Linux
that I'd like to get running on Windows.  I prefer the Linux way of
doing things but I'm not going to make any headway if I just try to
brow-beat Windows and Windows' users over the things that aren't
implement the same way.  And unfortunately neither are you.  If I write
a script that's going to take some filenames on the command-line, I'm
going to have to implement a custom path to expand globs on Windows (if
that's the behavior I need).

You may prefer "t" to be invoked example the same way on Linux as
Windows, but unless your program feels natural on the Linux
command-line, it hardly matters to Linux users whether your program is
invoked in the exact same way on Linux and Windows.  If Linux is indeed
going to be a first-class target for an application, you will want to do
things the Linux or unix way.  This may mean disabling globbing
internally and just allowing arbitrary filenames on the command-line.
Whatever. But this strange idea of yours that every OS should be like
Windows is unrealistic and even highly offensive to some of our
sensibilities. It doesn't matter what is better or more logical in your
opinion.

Python may provide some nice abstractions, but at the end of the day,
there are always OS-specific things you'll have to and will want to deal
with.




More information about the Python-list mailing list