Skip to content

Instantly share code, notes, and snippets.

@K240-zz
Created November 5, 2015 09:51
Show Gist options
  • Save K240-zz/1470eb1742114dfb692d to your computer and use it in GitHub Desktop.
Save K240-zz/1470eb1742114dfb692d to your computer and use it in GitHub Desktop.
execute python from file instead of python.executeFile
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