Commit 78baec33 authored by Jason R. Coombs's avatar Jason R. Coombs

Use .pya extension instead of simply .py to avoid creating scripts that are importable as modules.

--HG--
extra : histedit_source : ef811b339d08652c845c5556fd7e2d0f38ee12df
parent e78ad567
...@@ -1844,8 +1844,8 @@ class WindowsScriptWriter(ScriptWriter): ...@@ -1844,8 +1844,8 @@ class WindowsScriptWriter(ScriptWriter):
@classmethod @classmethod
def _get_script_args(cls, type_, name, header, script_text): def _get_script_args(cls, type_, name, header, script_text):
"For Windows, add a .py extension" "For Windows, add a .py extension"
ext = dict(console='.py', gui='.pyw')[type_] ext = dict(console='.pya', gui='.pyw')[type_]
old = ['.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe'] old = ['.pya', '.py', '-script.py', '.pyc', '.pyo', '.pyw', '.exe']
old.remove(ext) old.remove(ext)
header = cls._adjust_header(type_, header) header = cls._adjust_header(type_, header)
blockers = [name+x for x in old] blockers = [name+x for x in old]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment