So, as I understand it the problem in the fact that you load bzr.py into Pythonwin debugger and then run execution of the script. Therefore, original command-line is invokation of Pythonwin, and we need actually sys.argv.
I can only suggest add some workaround to win32util.py and check for Pythonwin. In that case we should skip all our smart command-line split code and simply use sys.argv.
Maybe Pythonwin created some environment variables we can check instead of create regexp for command-line? Can you check their documentation?
So, as I understand it the problem in the fact that you load bzr.py into Pythonwin debugger and then run execution of the script. Therefore, original command-line is invokation of Pythonwin, and we need actually sys.argv.
I can only suggest add some workaround to win32util.py and check for Pythonwin. In that case we should skip all our smart command-line split code and simply use sys.argv.
Maybe Pythonwin created some environment variables we can check instead of create regexp for command-line? Can you check their documentation?