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

Add --script flag as shorthand for notebook save_script option. #1168

Merged
merged 4 commits into from Dec 18, 2011

Conversation

fperez
Copy link
Member

@fperez fperez commented Dec 17, 2011

Also expand the section of the docs dealing with notebook imports.

@@ -40,10 +47,12 @@ class NotebookManager(LoggingConfigurable):
""")

save_script = Bool(False, config=True,
help="""Also save notebooks as a Python script.
help="""Automaticall create a Python script when saving the notebook.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically - it's missing the y

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed!

# the flags that are specific to the frontend
# these must be scrubbed before being passed to the kernel,
# or it will raise an error on unrecognized flags
notebook_flags = ['no-browser', 'no-mathjax', 'read-only']
notebook_flags = ['no-browser', 'no-mathjax', 'read-only', 'script']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to include 'no-script' in notebook_flags, so it won't be relayed to kernel

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing it now.

@minrk
Copy link
Member

minrk commented Dec 18, 2011

Typically we have defined flags in the same file as the application that uses them, but I don't actually see anything wrong with doing it this way.

@fperez
Copy link
Member Author

fperez commented Dec 18, 2011

OK, I'll move it over for consistency's sake. Not having done it before, I did what seemed most obvious immediately, but I think it's better to keep a consistent pattern.

@fperez
Copy link
Member Author

fperez commented Dec 18, 2011

Pushed, let me know how it looks and we'll merge when ready. Thanks for the review!

@minrk
Copy link
Member

minrk commented Dec 18, 2011

thanks, looks good. Go ahead and merge.

@fperez
Copy link
Member Author

fperez commented Dec 18, 2011

Great, thanks. Merging now.

fperez added a commit that referenced this pull request Dec 18, 2011
Add --script/--no-script flags as shorthands for the NotebookManager.save_script option.
@fperez fperez merged commit e953107 into ipython:master Dec 18, 2011
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Add --script/--no-script flags as shorthands for the NotebookManager.save_script option.
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

3 participants