Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: f34177a6f9fd7d8afa38f20dd18721a34f808f96 authored by Larry Hastings on 23 February 2014, 08:18:24 UTC
Version bump for Python 3.4.0rc2.
Tip revision: f34177a
__main__.py
"""Main entry point"""

import sys
if sys.argv[0].endswith("__main__.py"):
    import os.path
    # We change sys.argv[0] to make help message more useful
    # use executable without path, unquoted
    # (it's just a hint anyway)
    # (if you have spaces in your executable you get what you deserve!)
    executable = os.path.basename(sys.executable)
    sys.argv[0] = executable + " -m unittest"
    del os

__unittest = True

from .main import main, TestProgram

main(module=None)
back to top