Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/Tools/scripts/__pycache__/win_add2path.cpython-36.pyc

3

� fz�@sXdZddlZddlZddlZddlZejZdZdZdZ	dd�Z
dd	�Zed
krTe�dS)aAdd Python to the search path on Windows

This is a simple script to add Python to the Windows search path. It
modifies the current user (HKCU) tree of the registry.

Copyright (c) 2008 by Christian Heimes <christian@cheimes.de>
Licensed to PSF under a Contributor Agreement.
�NZEnvironment�PATHz%PATH%c
Cstjjtjjtj��}tjj|d�}tjd}tt	d�rbt	j
j|d�}tjj|�}tjj|d�}nd}tj
tt���}ytj|t�d}Wntk
r�t}YnX|g}x4|||fD]&}	|	r�|	|kr�tjj|	�r�|j|	�q�Wtjj|�}tj|tdtj|�||fSQRXdS)NZScripts�APPDATA�	USER_SITEz	%APPDATA%r)�os�path�dirname�normpath�sys�
executable�join�environ�hasattr�siter�replace�winregZ	CreateKey�HKCU�ENVZQueryValueExr�OSError�DEFAULT�isdir�append�pathsepZ
SetValueExZ
REG_EXPAND_SZ)
Z
pythonpath�scriptsZappdataZusersiteZuserpathZuserscripts�key�envpath�pathsr�r�?/opt/alt/python36/lib64/python3.6/Tools/scripts/win_add2path.py�modifys(


rcCsdt�\}}t|�dkr6td�tdj|dd���ntd�td|�td�ttj|��dS)N�zPath(s) added:�
zNo path was addedz
PATH is now:
%s
z	Expanded:)r�len�printrrZExpandEnvironmentStrings)rrrrr�main.s
r#�__main__)
�__doc__r	rrr�HKEY_CURRENT_USERrrrrrr#�__name__rrrr�<module>s