summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/lib2to3/__main__.py4
-rwxr-xr-xTools/scripts/2to35
2 files changed, 6 insertions, 3 deletions
diff --git a/Lib/lib2to3/__main__.py b/Lib/lib2to3/__main__.py
new file mode 100644
index 0000000..80688ba
--- /dev/null
+++ b/Lib/lib2to3/__main__.py
@@ -0,0 +1,4 @@
+import sys
+from .main import main
+
+sys.exit(main("lib2to3.fixes"))
diff --git a/Tools/scripts/2to3 b/Tools/scripts/2to3
index fbd4aa6..2eb5dad 100755
--- a/Tools/scripts/2to3
+++ b/Tools/scripts/2to3
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-import sys
-from lib2to3.main import main
+import runpy
-sys.exit(main("lib2to3.fixes"))
+runpy.run_module('lib2to3', run_name='__main__', alter_sys=True)