Staging
v0.8.1
https://github.com/python/cpython
Revision 3b43bfaae665ab784ef67cefc3a3f95a75aafdc4 authored by Ned Deily on 09 January 2018, 02:57:13 UTC, committed by Ned Deily on 09 January 2018, 02:57:13 UTC
1 parent ca0c5f2
Raw File
Tip revision: 3b43bfaae665ab784ef67cefc3a3f95a75aafdc4 authored by Ned Deily on 09 January 2018, 02:57:13 UTC
Update docs for 3.7.0a4
Tip revision: 3b43bfa
__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

main(module=None)
back to top