You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to compile a python module down to a string, that can be passed along with arguments to an external engine which then loads the module and runs the run function with the arguments.
So my basic test is if the following is posible:
import stickytape
def test(*args, **kwargs):raise ImportError("No test function loaded")
source_code = stickytape.script("stickytape_test/__init__.py")
exec(source_code)
assert test("test") == "test"
# stickytape_test/__init__.py
from .core import *
# stickytape_test/core.py
def test(out):
return out
I get a NameError: name '__stickytape_working_dir' is not defined
Any suggestions on how to do something like this?
The text was updated successfully, but these errors were encountered:
I want to be able to compile a python module down to a string, that can be passed along with arguments to an external engine which then loads the module and runs the run function with the arguments.
So my basic test is if the following is posible:
I get a
NameError: name '__stickytape_working_dir' is not defined
Any suggestions on how to do something like this?
The text was updated successfully, but these errors were encountered: