Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/fixnotice.cpython-33.pyo

�
��f�c@s�dZdaddlZddlZddlZdadadaddd�Zdd�Z	d	d
�Z
edkre	�ndS(u�(Ostensibly) fix copyright notices in files.

Actually, this script will simply replace a block of text in a file from one
string to another.  It will only do this once though, i.e. not globally
throughout the file.  It writes a backup file and then does an os.rename()
dance for atomicity.

Usage: fixnotices.py [options] [filenames]
Options:
    -h / --help
        Print this message and exit

    --oldnotice=file
        Use the notice in the file as the old (to be replaced) string, instead
        of the hard coded value in the script.

    --newnotice=file
        Use the notice in the file as the new (replacement) string, instead of
        the hard coded value in the script.

    --dry-run
        Don't actually make the changes, but print out the list of files that
        would change.  When used with -v, a status will be printed for every
        file.

    -v / --verbose
        Print a message for every file looked at, indicating whether the file
        is changed or not.
u�/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
All rights reserved.

See the file "Misc/COPYRIGHT" for information on usage and
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
******************************************************************/
iNucCs5ttt��|r$t|�ntj|�dS(N(uprintu__doc__uglobalsusysuexit(ucodeumsg((u</opt/alt/python33/lib64/python3.3/Tools/scripts/fixnotice.pyuusage4s
uusagecCsNy;tjtjdd�ddddddg�\}}Wn5tjk
rr}ztd|�WYdd}~XnXx�|D]�\}}|dkr�td
�qz|dkr�daqz|d
kr�daqz|dkr�t|�}|j�a	|j
�qz|dkrzt|�}|j�a|j
�qzqzWx|D]}t|�q6WdS(Niuhvuhelpu
oldnotice=u
newnotice=udry-runuverboseu-hu--helpiu-vu	--verboseu	--dry-runu--oldnoticeu--newnotice(u-hu--help(u-vu	--verbose(
ugetoptusysuargvuerroruusageuVERBOSEuDRYRUNuopenureadu
OLD_NOTICEucloseu
NEW_NOTICEuprocess(uoptsuargsumsguoptuargufp((u</opt/alt/python33/lib64/python3.3/Tools/scripts/fixnotice.pyumain;s.	 
		

umaincCst|�}|j�}|j�|jt�}|dkrWtrStd|�ndStsctrstd|�ntr}dS|d|�t||t	t�d�}|d}|d}t|d�}|j
|�|j�tj||�tj||�dS(Niu
no change:u
   change:u.newu.bakuw(
uopenureaducloseufindu
OLD_NOTICEuVERBOSEuprintuDRYRUNu
NEW_NOTICEulenuwriteuosurename(ufileufudatauiunewubackup((u</opt/alt/python33/lib64/python3.3/Tools/scripts/fixnotice.pyuprocessXs(
,



uprocessu__main__(u__doc__u
OLD_NOTICEuosusysugetoptu
NEW_NOTICEuDRYRUNuVERBOSEuusageumainuprocessu__name__(((u</opt/alt/python33/lib64/python3.3/Tools/scripts/fixnotice.pyu<module>s