Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/Tools/scripts/__pycache__/win_add2path.cpython-34.pyo

�
e fM�@s�dZddlZddlZddlZddlZejZdZdZdZ	dd�Z
dd	�Zed
kre�ndS)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	Cshtjjtjjtj��}tjj|d�}tjd}tt	d�rt	j
j|d�}tjj|d�}nd}tj
tt���}ytj|t�d}Wntk
r�t}YnX|g}xK|||fD]:}|r�||kr�tjj|�r�|j|�q�q�Wtjj|�}tj|tdtj|�||fSWdQXdS)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�scriptsZappdataZuserpathZuserscripts�key�envpath�pathsr�r�?/opt/alt/python34/lib64/python3.4/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