Created
November 5, 2015 09:51
-
-
Save K240-zz/1470eb1742114dfb692d to your computer and use it in GitHub Desktop.
execute python from file instead of python.executeFile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn execute_python filename = | |
( | |
try | |
( | |
fd = openFile filename mode:"r" | |
seek fd #eof | |
maxlen=filepos fd | |
seek fd 0 | |
code = readChars fd maxlen errorAtEOF:false | |
close fd | |
return python.execute code | |
) | |
catch | |
( | |
return false | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment