python 2.7.12 on Linux behaving differently than on Windows

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Dec 6 02:12:41 EST 2016


Dennis Lee Bieber wrote:
> -lm is not a valid file name on the OS's that use - as an option
> prefix.

It's not invalid -- you can create a file called -lm
on a unix system if you want, you just have to be a bit
sneaky about how you refer to it:

% echo foo > ./-lm
% ls
-lm
% cat ./-lm
foo

Sane people normally refrain from using such file names,
however, because of the hassle of dealing with them.

-- 
Greg


More information about the Python-list mailing list