Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/Tools/scripts/__pycache__/win_add2path.cpython-35.opt-1.pyc



��Yfz�@s�dZddlZddlZddlZddlZejZdZdZdZ	dd�Z
dd	�Zed
kr|e�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
Csxtjjtjjtj��}tjj|d�}tjd}tt	d�r�t	j
j|d�}tjj|�}tjj|d�}nd}tj
tt���}ytj|t�d}Wntk
r�t}YnX|g}xH|||fD]7}	|	r�|	|kr�tjj|	�r�|j|	�q�Wtjj|�}tj|tdtj|�||fSWdQRXdS)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/python35/lib64/python3.5/Tools/scripts/win_add2path.py�modifys(!

	$rcCs�t�\}}t|�dkrKtd�tdj|dd���n
td�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