elevate icon indicating copy to clipboard operation
elevate copied to clipboard

Fail to start *.py from PyCharm on Windows 10

Open ChrisPHL opened this issue 4 years ago • 1 comments

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?

ChrisPHL avatar Nov 14 '19 12:11 ChrisPHL

Does the cwd_and_abs_paths branch help at all, out of interest?

barneygale avatar Nov 18 '19 22:11 barneygale