[Python-Dev] [Python-checkins] r88503 - in python/branches/py3k: Lib/lib2to3/__main__.py Tools/scripts/2to3
Benjamin Peterson
benjamin at python.org
Wed Feb 23 03:23:54 CET 2011
2011/2/22 brett.cannon <python-checkins at python.org>:
> Author: brett.cannon
> Date: Tue Feb 22 20:12:43 2011
> New Revision: 88503
>
> Log:
> Add lib2to3.__main__ to make it easier for debugging purposes to run 2to3.
Please revert this and do it in the sandbox.
>
> Added:
> python/branches/py3k/Lib/lib2to3/__main__.py
> Modified:
> python/branches/py3k/Tools/scripts/2to3
>
> Added: python/branches/py3k/Lib/lib2to3/__main__.py
> ==============================================================================
> --- (empty file)
> +++ python/branches/py3k/Lib/lib2to3/__main__.py Tue Feb 22 20:12:43 2011
> @@ -0,0 +1,4 @@
> +import sys
> +from .main import main
> +
> +sys.exit(main("lib2to3.fixes"))
>
> Modified: python/branches/py3k/Tools/scripts/2to3
> ==============================================================================
> --- python/branches/py3k/Tools/scripts/2to3 (original)
> +++ python/branches/py3k/Tools/scripts/2to3 Tue Feb 22 20:12:43 2011
> @@ -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)
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
--
Regards,
Benjamin
More information about the Python-Dev
mailing list