'For Windows, add a .py extension'

@classmethod
def _get_script_args(cls, type_, name, header, script_text):

    ext = dict(console='.pya', gui='.pyw')[type_]
    if (ext not in os.environ['PATHEXT'].lower().split(';')):
        warnings.warn(('%s    not    listed    in    PATHEXT;    scripts    will    not    be    recognized    as    executables.' % ext), UserWarning)
    old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
    old.remove(ext)
    header = cls._adjust_header(type_, header)
    blockers = [(name + x) for x in old]
    (yield ((name + ext), (header + script_text), 't', blockers))
