idlex
idlex copied to clipboard
EditWithIdleX.py keeps failing due to 3 errors
Here are the errors:
Traceback (most recent call last):
File "C:\Python37\Scripts\EditWithIdleX.py", line 194, in
Currently Using Python 3.7.2
Maybe it would be better to use sys.executable (Python 2 docs) (Python 3 docs) to find the path to the Python interpreter? Looks like there can be several editwithidle commands in the registry depending on which Python versions have been installed, so I think this should be a lot more straightforward.
Only one version has been installed
On Thu, Aug 29, 2019 at 2:02 PM DefinitelyNotAnAlien < [email protected]> wrote:
Maybe it would be better to use sys.executable (Python 2 docs) https://docs.python.org/2/library/sys.html#sys.executable (Python 3 docs) https://docs.python.org/3/library/sys.html#sys.executable to find the path to the Python executable? Looks like there can be several editwithidle commands in the registry depending on which Python versions have been installed.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/serwy/idlex/issues/11?email_source=notifications&email_token=AH64DBPZGT7WTWPI6WZHPILQHAMNVA5CNFSM4IRJ2V62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5PP4OA#issuecomment-526319160, or mute the thread https://github.com/notifications/unsubscribe-auth/AH64DBJ3DWMPH457PTFAJ2DQHAMNVANCNFSM4IRJ2V6Q .
What the previous comment was suggesting something like simply replace the get_python_executable() function with sys.executable and it should work.
What the previous comment was suggesting something like simply replace the get_python_executable() function with sys.executable and it should work.
This works: I replaced get_python_executable() by the standrd string to get this path i.e., sys.executable https://docs.python.org/3/library/sys.html
line 95: path_to_python = sys.executable #get_python_executable() line 162: "Python found at: %r" % sys.executable, #get_python_executable()
then launch again the script. --> feb 2021, windows 10 up-to-date, python3.9.2 amd64 (evenif no python2.7 installed in parallel which may cause some mess).
Here are the errors:
Traceback (most recent call last): File "C:\Python37\Scripts\EditWithIdleX.py", line 194, in build_gui() File "C:\Python37\Scripts\EditWithIdleX.py", line 162, in build_gui "Python found at: %r" % get_python_executable(), File "C:\Python37\Scripts\EditWithIdleX.py", line 65, in get_python_executable p = W.OpenKey(reg, r'Python.File\shell\Edit with IDLE\command') FileNotFoundError: [WinError 2] The system cannot find the file specified
Currently Using Python 3.7.2
in the EditWIthIdleX.py remplace the p = W.OpenKey(reg, r'Python.File\shell\Edit with IDLE\command')
by
p = W.OpenKey(reg, r'Python.File\shell\editwithidle\shell\edit310\command')
that will solve your problem
.
in the EditWIthIdleX.py remplace the
p = W.OpenKey(reg, r'Python.File\shell\Edit with IDLE\command')
byp = W.OpenKey(reg, r'Python.File\shell\editwithidle\shell\edit310\command')
that will solve your problem .This worked for me after changing
edit310
toedit311
Currently using Python 3.11.2