Skip to content

Option to add/remove to system path/variables #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
petebachant opened this issue Nov 18, 2014 · 7 comments
Closed

Option to add/remove to system path/variables #28

petebachant opened this issue Nov 18, 2014 · 7 comments
Labels

Comments

@petebachant
Copy link

This would be nice to have on the control panel. Maybe it's antithetical to the goal of the project, but since Python(x,y) is not as actively maintained, and Anaconda does not include some important packages, e.g., guiqwt, it would be helpful.

@stonebig
Copy link
Contributor

Isn't this sufficient ?

!msconfig.exe

or this ?
https://github.com/winpython/winpython/wiki/Installation#Registration

@petebachant
Copy link
Author

What would one do inside msconfig? I just see boot options and such.

Registering from the Control Panel is also not working as it should. I don't see the files being associated correctly. Note that I have previously installed then uninstalled both Python(x,y) and Anaconda distributions.

@petebachant petebachant reopened this Nov 18, 2014
@stonebig
Copy link
Contributor

Well, I never tried this functionnality on me. It's curious it doesn't work, as Pierre Raybaut said it was and I don't think I touched it.

This part is written in chinese, I don't have a clue on what the problem could be

https://github.com/winpython/winpython/blob/master/winpython/associate.py

@stonebig
Copy link
Contributor

I understand indirectly here that it works on some PCs
https://sourceforge.net/p/winpython/tickets/125/

@petebachant
Copy link
Author

I seem to have gotten the distribution to register from a Python interpreter:

>>> import sys
>>> from winpython import associate
>>> associate.register(sys.prefix)
Registered: Python

I now see the Windows Explorer context menu items for editing with IDLE and Spyder, so that's some progress. At least the winpython.associate module seems to work.

@petebachant petebachant reopened this Nov 21, 2014
@patricktokeeffe
Copy link

This was discussed before and the original author (Pierre) indicated it was included starting with "[r4c7a90c40f0a]". The solution devised in that ticket was not to modify winpython registration, but add another option entirely: 'Add/remove from system path'. Perhaps it was reverted as some point, because I don't see that feature in 2.7.6.4.

The functionality described in ticket 125 is interesting but appears to be missing from the python distro currently in Winpython. It's probably wrapped up in the Windows Installer, not core python itself. Since the goal is more transparent system integration, though, it's not really compatible with the hands-off nature of WinPython.


@petebachant if previous versions have been installed on a Windows machine, the associative registry entry may have an outdated path. This particular registry key is created by Windows when it first encounters a new executable file name so (re)installing won't fix anything.

If you have ever selected an application in the Open With... dialog, pressed OK, and been greeted with no activity, this broken-key-path error has manifested. LibreOffice, for instance, includes a version number in the installation directory path so LO apps fall prey to this problem after major upgrades.

  1. Launch regedit and position the cursor at the top (My Computer)
  2. Search for keys (not values or data) named python.exe and pythonw.exe; select the first instance which should be under HKEY_CLASSES_ROOT\Applications.
  3. Check the data of the default value within the shell\open\command subkey: if the path is outdated, delete the key (the whole python.exe node) and it will be re-created with the correct path next time python.exe is run.

There are several other keys named after the executable but, in my experience, deleting the key under HKEY_CLASSES_ROOT will cause all other instances to be updated/recreated.

@stonebig
Copy link
Contributor

in the WinPython Control Panel you can register/unregister the base Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants