Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.100.194
138 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
lib2to3 /
fixes /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
47
B
-rw-r--r--
__init__.pyc
131
B
-rw-r--r--
fix_apply.py
2.38
KB
-rw-r--r--
fix_apply.pyc
2.03
KB
-rw-r--r--
fix_asserts.py
984
B
-rw-r--r--
fix_asserts.pyc
1.52
KB
-rw-r--r--
fix_basestring.py
321
B
-rw-r--r--
fix_basestring.pyc
801
B
-rw-r--r--
fix_buffer.py
591
B
-rw-r--r--
fix_buffer.pyc
958
B
-rw-r--r--
fix_dict.py
3.73
KB
-rw-r--r--
fix_dict.pyc
3.67
KB
-rw-r--r--
fix_except.py
3.27
KB
-rw-r--r--
fix_except.pyc
2.93
KB
-rw-r--r--
fix_exec.py
1002
B
-rw-r--r--
fix_exec.pyc
1.39
KB
-rw-r--r--
fix_execfile.py
2.01
KB
-rw-r--r--
fix_execfile.pyc
2.05
KB
-rw-r--r--
fix_exitfunc.py
2.44
KB
-rw-r--r--
fix_exitfunc.pyc
2.68
KB
-rw-r--r--
fix_filter.py
2.06
KB
-rw-r--r--
fix_filter.pyc
2.21
KB
-rw-r--r--
fix_funcattrs.py
645
B
-rw-r--r--
fix_funcattrs.pyc
1.1
KB
-rw-r--r--
fix_future.py
547
B
-rw-r--r--
fix_future.pyc
927
B
-rw-r--r--
fix_getcwdu.py
452
B
-rw-r--r--
fix_getcwdu.pyc
934
B
-rw-r--r--
fix_has_key.py
3.15
KB
-rw-r--r--
fix_has_key.pyc
3.12
KB
-rw-r--r--
fix_idioms.py
4.77
KB
-rw-r--r--
fix_idioms.pyc
4.42
KB
-rw-r--r--
fix_import.py
3.18
KB
-rw-r--r--
fix_import.pyc
3.17
KB
-rw-r--r--
fix_imports.py
5.56
KB
-rw-r--r--
fix_imports.pyc
5.23
KB
-rw-r--r--
fix_imports2.py
289
B
-rw-r--r--
fix_imports2.pyc
630
B
-rw-r--r--
fix_input.py
710
B
-rw-r--r--
fix_input.pyc
1.12
KB
-rw-r--r--
fix_intern.py
1.82
KB
-rw-r--r--
fix_intern.pyc
1.75
KB
-rw-r--r--
fix_isinstance.py
1.57
KB
-rw-r--r--
fix_isinstance.pyc
1.8
KB
-rw-r--r--
fix_itertools.py
1.51
KB
-rw-r--r--
fix_itertools.pyc
1.76
KB
-rw-r--r--
fix_itertools_imports.py
2.04
KB
-rw-r--r--
fix_itertools_imports.pyc
1.98
KB
-rw-r--r--
fix_long.py
477
B
-rw-r--r--
fix_long.pyc
849
B
-rw-r--r--
fix_map.py
2.99
KB
-rw-r--r--
fix_map.pyc
2.98
KB
-rw-r--r--
fix_metaclass.py
8.02
KB
-rw-r--r--
fix_metaclass.pyc
6.43
KB
-rw-r--r--
fix_methodattrs.py
615
B
-rw-r--r--
fix_methodattrs.pyc
1.12
KB
-rw-r--r--
fix_ne.py
573
B
-rw-r--r--
fix_ne.pyc
993
B
-rw-r--r--
fix_next.py
3.11
KB
-rw-r--r--
fix_next.pyc
3.46
KB
-rw-r--r--
fix_nonzero.py
598
B
-rw-r--r--
fix_nonzero.pyc
1.07
KB
-rw-r--r--
fix_numliterals.py
773
B
-rw-r--r--
fix_numliterals.pyc
1.23
KB
-rw-r--r--
fix_operator.py
3.39
KB
-rw-r--r--
fix_operator.pyc
5
KB
-rw-r--r--
fix_paren.py
1.2
KB
-rw-r--r--
fix_paren.pyc
1.51
KB
-rw-r--r--
fix_print.py
2.8
KB
-rw-r--r--
fix_print.pyc
2.67
KB
-rw-r--r--
fix_raise.py
2.87
KB
-rw-r--r--
fix_raise.pyc
2.45
KB
-rw-r--r--
fix_raw_input.py
455
B
-rw-r--r--
fix_raw_input.pyc
944
B
-rw-r--r--
fix_reduce.py
839
B
-rw-r--r--
fix_reduce.pyc
1.24
KB
-rw-r--r--
fix_renames.py
2.17
KB
-rw-r--r--
fix_renames.pyc
2.4
KB
-rw-r--r--
fix_repr.py
614
B
-rw-r--r--
fix_repr.pyc
1
KB
-rw-r--r--
fix_set_literal.py
1.66
KB
-rw-r--r--
fix_set_literal.pyc
1.95
KB
-rw-r--r--
fix_standarderror.py
450
B
-rw-r--r--
fix_standarderror.pyc
861
B
-rw-r--r--
fix_sys_exc.py
1.01
KB
-rw-r--r--
fix_sys_exc.pyc
1.67
KB
-rw-r--r--
fix_throw.py
1.55
KB
-rw-r--r--
fix_throw.pyc
1.96
KB
-rw-r--r--
fix_tuple_params.py
5.45
KB
-rw-r--r--
fix_tuple_params.pyc
5.31
KB
-rw-r--r--
fix_types.py
1.77
KB
-rw-r--r--
fix_types.pyc
2.15
KB
-rw-r--r--
fix_unicode.py
1.24
KB
-rw-r--r--
fix_unicode.pyc
1.68
KB
-rw-r--r--
fix_urllib.py
8.19
KB
-rw-r--r--
fix_urllib.pyc
6.97
KB
-rw-r--r--
fix_ws_comma.py
1.07
KB
-rw-r--r--
fix_ws_comma.pyc
1.36
KB
-rw-r--r--
fix_xrange.py
2.64
KB
-rw-r--r--
fix_xrange.pyc
3
KB
-rw-r--r--
fix_xreadlines.py
690
B
-rw-r--r--
fix_xreadlines.pyc
1.13
KB
-rw-r--r--
fix_zip.py
904
B
-rw-r--r--
fix_zip.pyc
1.32
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fix_print.py
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for print. Change: 'print' into 'print()' 'print ...' into 'print(...)' 'print ... ,' into 'print(..., end=" ")' 'print >>x, ...' into 'print(..., file=x)' No changes are applied if print_function is imported from __future__ """ # Local imports from .. import patcomp from .. import pytree from ..pgen2 import token from .. import fixer_base from ..fixer_util import Name, Call, Comma, String, is_tuple parend_expr = patcomp.compile_pattern( """atom< '(' [atom|STRING|NAME] ')' >""" ) class FixPrint(fixer_base.BaseFix): BM_compatible = True PATTERN = """ simple_stmt< any* bare='print' any* > | print_stmt """ def transform(self, node, results): assert results bare_print = results.get("bare") if bare_print: # Special-case print all by itself bare_print.replace(Call(Name(u"print"), [], prefix=bare_print.prefix)) return assert node.children[0] == Name(u"print") args = node.children[1:] if len(args) == 1 and parend_expr.match(args[0]): # We don't want to keep sticking parens around an # already-parenthesised expression. return sep = end = file = None if args and args[-1] == Comma(): args = args[:-1] end = " " if args and args[0] == pytree.Leaf(token.RIGHTSHIFT, u">>"): assert len(args) >= 2 file = args[1].clone() args = args[3:] # Strip a possible comma after the file expression # Now synthesize a print(args, sep=..., end=..., file=...) node. l_args = [arg.clone() for arg in args] if l_args: l_args[0].prefix = u"" if sep is not None or end is not None or file is not None: if sep is not None: self.add_kwarg(l_args, u"sep", String(repr(sep))) if end is not None: self.add_kwarg(l_args, u"end", String(repr(end))) if file is not None: self.add_kwarg(l_args, u"file", file) n_stmt = Call(Name(u"print"), l_args) n_stmt.prefix = node.prefix return n_stmt def add_kwarg(self, l_nodes, s_kwd, n_expr): # XXX All this prefix-setting may lose comments (though rarely) n_expr.prefix = u"" n_argument = pytree.Node(self.syms.argument, (Name(s_kwd), pytree.Leaf(token.EQUAL, u"="), n_expr)) if l_nodes: l_nodes.append(Comma()) n_argument.prefix = u" " l_nodes.append(n_argument)
Close