Filename suffix default for command line

Would there be any disadvantage to checking for filename.py whenever filename is not found so that "super.py" could be invoked with either "python super.py" or "python super"? Raymond Hettinger

It feels horribly DOS-like. Why? To save typing three characters? Why not rename the file then? Would "python super.py" also look for super.py.py if super.py didn't exist? What would the error message say? --Guido van Rossum (home page: http://www.python.org/~guido/)

Raymond Hettinger wrote:
How about super.pyc? What if both super.pyc and super.py exist but are not equal in effect? I think the idea is not necesarry. I think most people have <tab> configured to do commandline completion, so 'python supe<tab>' would probably achieve the same effect with the same amount of keystrokes. The disadvantage is, in my opinion, sideways: people get used to it, and it is not a good habit, because it's called super.py, not super. I don't like this proposal, I'd give it a -0 in case anyone is interested. yours, Gerrit. -- 202. If any one strike the body of a man higher in rank than he, he shall receive sixty blows with an ox-whip in public. -- 1780 BC, Hammurabi, Code of Law -- Asperger's Syndrome - a personal approach: http://people.nl.linux.org/~gerrit/english/

It feels horribly DOS-like. Why? To save typing three characters? Why not rename the file then? Would "python super.py" also look for super.py.py if super.py didn't exist? What would the error message say? --Guido van Rossum (home page: http://www.python.org/~guido/)

Raymond Hettinger wrote:
How about super.pyc? What if both super.pyc and super.py exist but are not equal in effect? I think the idea is not necesarry. I think most people have <tab> configured to do commandline completion, so 'python supe<tab>' would probably achieve the same effect with the same amount of keystrokes. The disadvantage is, in my opinion, sideways: people get used to it, and it is not a good habit, because it's called super.py, not super. I don't like this proposal, I'd give it a -0 in case anyone is interested. yours, Gerrit. -- 202. If any one strike the body of a man higher in rank than he, he shall receive sixty blows with an ox-whip in public. -- 1780 BC, Hammurabi, Code of Law -- Asperger's Syndrome - a personal approach: http://people.nl.linux.org/~gerrit/english/
participants (3)
-
Gerrit Holl
-
Guido van Rossum
-
Raymond Hettinger