MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //usr/lib/python2.4/Tools/scripts/cleanfuture.pyo
mò
‚=5Dc@s†dZdkZdkZdkZdkZdadadad„Zd„Z	d„Z
dfd„ƒYZedjoe	ƒndS(	s‘cleanfuture [-d][-r][-v] path ...

-d  Dry run.  Analyze, but don't make any changes to, files.
-r  Recurse.  Search for all .py files in subdirectories too.
-v  Verbose.  Print informative msgs.

Search Python (.py) files for future statements, and remove the features
from such statements that are already mandatory in the version of Python
you're using.

Pass one or more file and/or directory paths.  When a directory path, all
.py files within the directory will be examined, and, if the -r option is
given, likewise recursively for subdirectories.

Overwrites files in place, renaming the originals with a .bak extension. If
cleanfuture finds nothing to change, the file is left alone.  If cleanfuture
does change a file, the changed file is a fixed-point (i.e., running
cleanfuture on the resulting .py file won't change it again, at least not
until you try it again with a later Python release).

Limitations:  You can do these things, but this tool won't help you then:

+ A future statement cannot be mixed with any other statement on the same
  physical line (separated by semicolon).

+ A future statement cannot contain an "as" clause.

Example:  Assuming you're using Python 2.2, if a file containing

from __future__ import nested_scopes, generators

is analyzed by cleanfuture, the line is rewritten to

from __future__ import generators

because nested_scopes is no longer optional in 2.2 but generators is.
NicGsQtt|ƒ}di|ƒ}|ddjo|d7}ntii|ƒdS(Nt iÿÿÿÿs
(	tmaptstrtargststringstjointmsgtsyststderrtwrite(RRR((t//usr/lib/python2.4/Tools/scripts/cleanfuture.pyterrprint2s
cCsødk}y#|itiddƒ\}}Wn&|ij
o}t|ƒdSnXxe|D]]\}}|djot
d7a
q\|djotd7aq\|djotd7aq\q\W|ptdt
ƒdSnx|D]}t|ƒqàWdS(Nitdrvs-ds-rs-vsUsage:(tgetoptRtargvtoptsRterrorRRtotatdryruntrecursetverboset__doc__targtcheck(RRRRRR
R((R
tmain9s*	#
	



cCs»tii|ƒo·tii|ƒo£to
dG|GHnti|ƒ}xu|D]m}tii	||ƒ}to'tii|ƒotii|ƒp|iƒi
dƒot|ƒqQqQWdSntodG|GdGnyt|ƒ}Wn3tj
o'}td|t|ƒfƒdSnXt||ƒ}|iƒ}
|
o|iƒn|iƒ|
o?todGHto	dGHqˆnxy|
D]q\}}}d||d	|d	fGHx&t||d	ƒD]}	|i!|	GqÌW|djo	d
GHqdGH|GqWtp˜|d}
tii$|
ƒoti%|
ƒnti&||
ƒtod
G|GdG|
GHnt|dƒ}|i(|ƒ|iƒto
dG|GHq£q·nto	dGHndS(Nslisting directorys.pytcheckings...s%r: I/O Error: %sschanged.s+But this is a dry run, so leaving it alone.s%r lines %d-%dis
-- deleteds
-- change to:s.baktrenamedttotws	wrote news
unchanged.()tostpathtisdirtfiletislinkRtlistdirtnamestnameRtfullnameRtlowertendswithRtopentftIOErrorRRRtFutureFindertfftruntchangedt
gettheresttcloseRtstetlinetrangetitlinestNonetbaktexiststremovetrenametgR	(R!R$RR-R4R3R%R=R*R6R/R2R&R9((R
RNsf'
D	


	


R,cBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCs1||_||_d|_g|_g|_dS(Ni(R*tselftfnametateofR7R/(R>R*R?((R
t__init__ˆs
				cCsO|iodSn|iiƒ}|djo
d|_n|ii|ƒ|S(Nti(R>R@R*treadlineR4R7tappend(R>R4((R
tgetline’s


cCs0ti}ti}ti}ti}ti}ti}|i}ti	|i
ƒi}|ƒ\}
}\}	}\}}
}x?|
|||fjo(|ƒ\}
}\}	}\}}
}q{Wx6|
|jo(|ƒ\}
}\}	}\}}
}q½Wx6x?|
|||fjo(|ƒ\}
}\}	}\}}
}qùW|
|jo
|djpPn|	d}|ƒ\}
}\}	}\}}
}|
|jo
|djpPn|ƒ\}
}\}	}\}}
}|
|jo
|djpPn|ƒ\}
}\}	}\}}
}g}x†|
|jox|i|ƒ|ƒ\}
}\}	}\}}
}|
|jo
|djpPn|ƒ\}
}\}	}\}}
}qWd}|
|jo.|}|ƒ\}
}\}	}\}}
}n|
|j	o"td|i|	|fƒgSn|	d}g}xx|D]p}tt|dƒ}|djo|i|ƒq!|i!ƒ}|djp|t#i$joq!|i|ƒq!Wt%|ƒt%|ƒjoyt%|ƒdjo
d}nCd}|d	i&|ƒ7}|dj	o|d
|7}n|d7}|i|||fƒqöqöW|S(Nitfromt
__future__timportt,s)Skipping file %r; can't parse line %d:
%sisfrom __future__ import s, Rs
('ttokenizetSTRINGtNLtNEWLINEtCOMMENTtNAMEtOPR>R/tgenerate_tokensREtnexttgetttypettokentsrowtscolterowtecolR4t	startlinetfeaturesRDR8tcommentRR?tendlinet
okfeaturesR*tgetattrRGtobjecttgetMandatoryReleasetreleasedRtversion_infotlenR(R>R\RMR[RXRNRZRLRWRVRTRKRSRYR`R^RbR4ROR*R/RUR]RP((R
R.œs„							$)
))
$$$

$)
(





cCs-|io
d|_n|iiƒ|_dS(NRB(R>R@ttherestR*tread(R>((R
R0ûs

cCs¡|i}g|_|iƒxP|D]H\}}}|djo|i||d5q#|g|i||d+q#W|i	|iƒ|i
o|i|i
ƒndS(Ni(R>R/treverseR2R3R4R8R7R*t
writelinesReR	(R>R*R3R/R2R4((R
R	s		


(t__name__t
__module__RARER.R0R	(((R
R,†s
	
	
	_	t__main__(
RRGRJRRRRRRRRR,Ri(RGR,RRJRRRR((R
t?'s							8