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

change default extension to .ipy for %save -r #1828

Merged
merged 2 commits into from Jun 2, 2012

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Jun 1, 2012

Well... everything in title.
I think it makes sens as most of the time, if one want to export raw history it won't be python executable...

fname, codefrom = unquote_filename(args[0]), " ".join(args[1:])
if not fname.endswith('.py'):
fname += '.py'
if not (fname.endswith(u'.py') or fname.endswith(u'.ipy')):
Copy link
Member

Choose a reason for hiding this comment

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

endswith can accept a tuple of possibilities, so this can be a bit cleaner.

@takluyver
Copy link
Member

Makes sense, and looks good apart from that one tiny suggestion.

@Carreau
Copy link
Member Author

Carreau commented Jun 1, 2012

Fixed.

@Carreau
Copy link
Member Author

Carreau commented Jun 2, 2012

Merging as it is simple, and to keep PR number low.

Carreau added a commit that referenced this pull request Jun 2, 2012
change default extension to .ipy for %save -r
@Carreau Carreau merged commit f3cf632 into ipython:master Jun 2, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
change default extension to .ipy for %save -r
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