lib64
/
python2.7
/
lib2to3
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
[DIR] fixes
N/A
[DIR] pgen2
N/A
Grammar.txt
6.93 KB
Rename
Delete
Grammar2.7.18.final.0.pickle
39.54 KB
Rename
Delete
PatternGrammar.txt
793 bytes
Rename
Delete
PatternGrammar2.7.18.final.0.pickle
2.73 KB
Rename
Delete
__init__.py
7 bytes
Rename
Delete
__init__.pyc
127 bytes
Rename
Delete
__init__.pyo
127 bytes
Rename
Delete
__main__.py
67 bytes
Rename
Delete
__main__.pyc
242 bytes
Rename
Delete
__main__.pyo
242 bytes
Rename
Delete
btm_matcher.py
6.67 KB
Rename
Delete
btm_matcher.pyc
5.69 KB
Rename
Delete
btm_matcher.pyo
5.69 KB
Rename
Delete
btm_utils.py
9.78 KB
Rename
Delete
btm_utils.pyc
7.39 KB
Rename
Delete
btm_utils.pyo
7.39 KB
Rename
Delete
fixer_base.py
6.62 KB
Rename
Delete
fixer_base.pyc
7.02 KB
Rename
Delete
fixer_base.pyo
7.02 KB
Rename
Delete
fixer_util.py
14.25 KB
Rename
Delete
fixer_util.pyc
14.34 KB
Rename
Delete
fixer_util.pyo
14.34 KB
Rename
Delete
main.py
11.33 KB
Rename
Delete
main.pyc
9.60 KB
Rename
Delete
main.pyo
9.56 KB
Rename
Delete
patcomp.py
6.90 KB
Rename
Delete
patcomp.pyc
6.45 KB
Rename
Delete
patcomp.pyo
6.14 KB
Rename
Delete
pygram.py
1.13 KB
Rename
Delete
pygram.pyc
1.41 KB
Rename
Delete
pygram.pyo
1.41 KB
Rename
Delete
pytree.py
28.36 KB
Rename
Delete
pytree.pyc
29.59 KB
Rename
Delete
pytree.pyo
28.73 KB
Rename
Delete
refactor.py
27.37 KB
Rename
Delete
refactor.pyc
23.35 KB
Rename
Delete
refactor.pyo
23.31 KB
Rename
Delete
� {fc @� s� d Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d � Z d e j f d � � YZ d � Z d d � Z d S( s Main program for 2to3. i����( t with_statementNi ( t refactorc C� s: | j � } | j � } t j | | | | d d d d �S( s% Return a unified diff of two strings.s (original)s (refactored)t linetermt ( t splitlinest difflibt unified_diff( t at bt filename( ( s$ /usr/lib64/python2.7/lib2to3/main.pyt diff_texts s t StdoutRefactoringToolc B� s; e Z d Z d d d d � Z d � Z d � Z d � Z RS( s2 A refactoring tool that can avoid overwriting its input files. Prints output to stdout. Output files can optionally be written to a different directory and or have an extra file suffix appended to their name for use in situations where you do not want to replace the input files. R c C� sv | | _ | | _ | r; | j t j � r; | t j 7} n | | _ | | _ | | _ t t | � j | | | � d S( sF Args: fixers: A list of fixers to import. options: A dict with RefactoringTool configuration. explicit: A list of fixers to run even if they are explicit. nobackups: If true no backup '.bak' files will be created for those files that are being refactored. show_diffs: Should diffs of the refactoring be printed to stdout? input_base_dir: The base directory for all input files. This class will strip this path prefix off of filenames before substituting it with output_dir. Only meaningful if output_dir is supplied. All files processed by refactor() must start with this path. output_dir: If supplied, all converted files will be written into this directory tree instead of input_base_dir. append_suffix: If supplied, all files output by this tool will have this appended to their filename. Useful for changing .py to .py3 for example by passing append_suffix='3'. N( t nobackupst show_diffst endswitht ost sept _input_base_dirt _output_dirt _append_suffixt superR t __init__( t selft fixerst optionst explicitR R t input_base_dirt output_dirt append_suffix( ( s$ /usr/lib64/python2.7/lib2to3/main.pyR $ s c O� s3 | j j | | | f � | j j | | | � d S( N( t errorst appendt loggert error( R t msgt argst kwargs( ( s$ /usr/lib64/python2.7/lib2to3/main.pyt log_errorA s c C� s� | } | j re | j | j � rI t j j | j | t | j � � } qe t d | | j f � � n | j r~ | | j 7} n | | k r� t j j | � } t j j | � s� t j | � n | j d | | � n | j sy| d } t j j | � r6y t j | � Wq6t j k r2} | j d | � q6Xn y t j | | � Wqyt j k ru} | j d | | � qyXn t t | � j } | | | | | � | j s�t j | | � n | | k r�t j | | � n d S( Ns5 filename %s does not start with the input_base_dir %ss Writing converted %s to %s.s .baks Can't remove backup %ss Can't rename %s to %s( R t startswithR R t patht joint lent ValueErrorR t dirnamet isdirt makedirst log_messageR t lexistst removeR t renameR R t write_filet shutilt copymode( R t new_textR t old_textt encodingt orig_filenameR t backupt errt write( ( s$ /usr/lib64/python2.7/lib2to3/main.pyR1 E s@ c C� s� | r | j d | � n� | j d | � | j r� t | | | � } y_ | j d k r� | j �( x | D] } | GHqg Wt j j � Wd QXn x | D] } | GHq� WWq� t k r� t d | f � d SXn d S( Ns No changes to %ss Refactored %ss+ couldn't encode %s's diff for your terminal( R- R R t output_lockt Nonet syst stdoutt flusht UnicodeEncodeErrort warn( R t oldt newR t equalt diff_linest line( ( s$ /usr/lib64/python2.7/lib2to3/main.pyt print_outputl s"