Closed hx2A closed 2 years ago
So the code in split_setup.py is dependent on the Python standard library inspect and its ability to get a function's source code. This only works if it can find the code in a file. When I use the IPython REPL, it must save the user's input to temporary files somewhere so that inspect is able to access the source. When I enter the same code into the generic Python interpreter, inspect cannot get the code. This is just how inspect works and has nothing to do with py5. Therefore, users must define settings()
when manually entering py5 code into the generic Python interpreter. There's nothing I can do to change this.
It ls already mentioned in the documentation that the generic Python REPL doesn't save code to a file and therefore inspect won't be able to get the source code for setup()
:
If you happen to be manually typing code into the generic Python REPL, it won’t work.
Entering py5 code to the generic Python terminal is convenient on OSX. It says it can't find the source code for
setup()
but everything works just fine.and will throw an exception ifsetup()
containssize()
. The IPython REPL must take of this source code issue for users. This might not be fixable.Found while testing the example code for #116