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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass sys.argv through %run when invoking .ipynb and .ipy files #13808

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tonyfast
Copy link
Contributor

@tonyfast tonyfast commented Nov 2, 2022

this change moves the safe_execfile_ipy a litte later in the %run magic.
with this change it is now possible to pass command line arguments into in the %run <file.ipynb|ipy>.

part of the motivation for this change is to use the %run method to bootstrap notebooks that are running in jupyterlite. we have to await micropip and currently IPython scripts are the only way to top-level await statements. 馃 passing the sys.argv around will make it possible to write more versatile startup code and blocks.

@tonyfast
Copy link
Contributor Author

seems like things are working after merging main, but i don't know where that docs error is coming from.

@krassowski
Copy link
Member

Docs will be fixed by #13872.

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

Successfully merging this pull request may close these issues.

None yet

2 participants