Shebang line on Windows?

Anssi Saari as at
Tue Feb 26 15:30:44 CET 2013

Michael Torrie <torriem at> writes:

> Actually, the shell isn't involved in parsing the shebang line at all.
> That's actually done in the kernel by the program loader.  So it's the
> kernel that has a problem with it; wonder if Linus would accept a patch
> to ignore the tailing CR?

Worth a try in my opinion. There's some historical information about the
shebang at There's a
table which says Linux since 2.4.0 removes trailing whitespace from the
shebang line. I guess Linux doesn't count CR as whitespace in this

More information about the Python-list mailing list