Hi
I'm wondering if I can invoke a script file on the SD card from within REPL?
So that I can observe the print log through the REPL console.
Is it possible to run a script file from within REPL?
Re: Is it possible to run a script file from within REPL?
import pathname
Where pathname points to the python file to execute.
Where pathname points to the python file to execute.
Re: Is it possible to run a script file from within REPL?
You can also do:
but this is subtly different from import, if I remember right.
Code: Select all
exec(open("code.py").read())