elevate
elevate copied to clipboard
Fail to start *.py from PyCharm on Windows 10
Hi Barney,
I'm happy to have found this Python module. Thank you so much! I included the functionality into my project and found sys.argv
in windows.py evaluates to ['D:\path_to_my\script.py']
. Since my script does not contain a shebang line nor the Windows system got a file association installed, the elevated call fails (of course) without any useful return value. :-/
Maybe there could be a test if the given file:
- Has a file name extension that is registered with the system OR
- Is a *.py an contains a shebang line with a windows executable
What do you think about that?
Does the cwd_and_abs_paths branch help at all, out of interest?