Added Python Compile Rule

This commit is contained in:
Cami Diez
2015-06-21 09:24:27 +08:00
parent 2f1460120e
commit a0949b1102
2 changed files with 32 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Appends .py when compiling python files
#
# Example:
# > python foo
# error: python: can't open file 'foo': [Errno 2] No such file or directory
#
#
def match(command, settings):
return (command.script.startswith ('python ')
and not command.script.endswith('.py'))
def get_new_command(command, settings):
return command.script + '.py'