Bugs item #1436900, was opened at 2006-02-22 18:38 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1436900&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parser/Compiler Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Wai Yip Tung (tungwaiyip) Assigned to: Nobody/Anonymous (nobody) Summary: Problem parsing cmdline parameter quoted with a trailing \ Initial Comment: This problem happens in launching Python from Windows. A quoted pathname is used as parameter. If and only if the pathname is ended with a trailing \, it is treated as an escape character. p.py ------------------------------------------------------- import sys from pprint import pprint pprint(sys.argv) ------------------------------------------------------- Note slash inside the quote is treated as path separators g:\usr\bin>c:\python24\python.exe g:\usr\bin\p.py " tung\wai\yip" wai ['g:\\usr\\bin\\p.py', 'tung\\wai\\yip', 'wai'] However the trailing \ is treated as an escape character for the quote. Only command line parameter is presented in sys.argv. g:\usr\bin>c:\python24\python.exe g:\usr\bin\p.py " tung\wai\yip\" wai ['g:\\usr\\bin\\p.py', 'tung\\wai\\yip" wai'] ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2006-02-22 20:12 Message: Logged In: YES user_id=849994 Is that Python-specific? I thought sys.argv is the cmdline args as Python gets them from Windows. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1436900&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com