win32ui: fix for correct init of sys.argv & CWD in sys.path (#1269 #1541)#1607
Merged
mhammond merged 1 commit intomhammond:masterfrom Nov 8, 2020
Merged
win32ui: fix for correct init of sys.argv & CWD in sys.path (#1269 #1541)#1607mhammond merged 1 commit intomhammond:masterfrom
mhammond merged 1 commit intomhammond:masterfrom
Conversation
sschukat
reviewed
Nov 6, 2020
mhammond
requested changes
Nov 6, 2020
Owner
mhammond
left a comment
There was a problem hiding this comment.
Thanks! I'll actually add support for CommandLineToArg now. So once I've pushed that, can you please rebase and squash your commits so there's only 1 with the detailed notes. I think this also deserves a note in CHANGES.txt
Owner
|
win32api.CommandLineToArgv has been checked in |
Collaborator
Author
|
…1269 mhammond#1541) * win32ui sets up sys.argv from commandline also upon a pre-set empty list (which is different from [''] meaning "no cmd line args"). Newer Python versions (since 3.5 or so) had changed primoridal sys.argv initialization. This also triggers correct sys.path initialization with CWD or file arg directory by PySys_SetArgv(Ex). * IDE startup: fix and improve commandline handling: Support dash arguments (-edit -new ..) instead of slashes ( /edit ). Slashes caused invalid sys.path initialization: sys.path[0] was 'C:\\' instead of CWD or dir of first file argument after opening a file from Explorer ( "/edit FILENAME" ) for example. Support opening of multiple files and a new -goto:LINENO option (to be given after a filename). Fix: Check if arg file for /edit exists before opening. Otherwise Pythonwin would freeze on PY3. Fix start_pythonwin.pyw for sys.argv + path standards.
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several PythonWin startup issues.
And Win10 SDK download in CI seems unnecessary