Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterize blocking in imported.run_code() #231

Closed
hx2A opened this issue Feb 5, 2023 · 1 comment
Closed

Parameterize blocking in imported.run_code() #231

hx2A opened this issue Feb 5, 2023 · 1 comment

Comments

@hx2A
Copy link
Collaborator

hx2A commented Feb 5, 2023

Users should be able to call imported.run_code(sketch_code, block=False) to change the default option in that module's _CODE_FRAMEWORK template.

@hx2A
Copy link
Collaborator Author

hx2A commented Mar 19, 2023

@villares , this is now fixed. The signature for imported.run_code() is now:

def run_code(sketch_path, *, classpath=None, new_process=False, exit_if_error=False,
             py5_options=None, sketch_args=None, block=True):

The * and the block=True are both new.

I can't test your specific use case but it should be OK. I did test everything else (py5bot, run_sketch util, etc) and everything works as expected.

@hx2A hx2A closed this as completed Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant