IndexError: list index out of range (run from Intellij Idea)
gkraser opened this issue · comments
When running from Intellij Idea under windows, the command line contains the full name of the script with a slash in the style of unix:
C:\pf\python\python.exe D:/projects/tests/opster1.py
In function sysname()
is expected to slash os.sep
.
Hmm, I'm wondering what should be done to handle such case. Maybe I should just separate by whatever slash is present in path?..
Does os.path.isabs("d:/projects/tests/opster1.py")
return True
on Windows?
os.path.isabs("d:/projects/tests/opster1.py")
on Windows return True.
os.path.normpath("d:/projects/tests/opster1.py")
return d:\projects\tests\opster1.py
.
Maybe run normpath
before parsing file name?
Sure! Give me few minutes, I'll release 3.8. :)
Enjoy! Fixed in 3.8.