[New-bugs-announce] [issue23141] Command line long filename not passed correctly
Adam Mead
report at bugs.python.org
Wed Dec 31 13:56:48 CET 2014
New submission from Adam Mead:
Under windows the following code does not pass the LFN to the script. Nor does any other method I've tried (getopts & argparse)
test.py
import sys
print ('Number of arguments:', len(sys.argv), 'arguments.')
print ('Argument List:', str(sys.argv))
for x in range(0, len(sys.argv)):
print("->" + sys.argv[x])
----------------------------------------
Output with quotes:
H:\bin>test "test lfn.txt"
Number of arguments: 3 arguments.
Argument List: ['H:\\bin\\test.py', ' test', 'lfn.txt']
->H:\bin\test.py
-> test
->lfn.txt
Output when doubling the quotes:
H:\bin>test ""test lfn.txt""
Number of arguments: 2 arguments.
Argument List: ['H:\\bin\\test.py', ' "test lfn.txt"']
->H:\bin\test.py
-> "test lfn.txt"
----------
components: Windows
messages: 233240
nosy: Adam.Mead, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Command line long filename not passed correctly
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23141>
_______________________________________
More information about the New-bugs-announce
mailing list