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

Better error messages for common magic commands. #2329

Merged
merged 2 commits into from Aug 25, 2012

Conversation

bfroehle
Copy link
Contributor

Print a helpful message when the user calls a magic command with a missing argument, rather than a long traceback.

In addition, I have removed the 'protected' magic list from qtconsole .. these are the magic whose name shows up like %load?. I think it's visually confusing to have some magics show up with a question mark, and it seems irrelevant if running the magic command prints a short usage error message. One small issue is this might prevent the discovery of the %magic? syntax for getting help. Perhaps we should catch UsageError in run_line_magic and run_cell_magic and suggest the user run %{magic_name}? for help.

Print a helpful message when the user calls a magic command with a missing
argument, rather than a long traceback.
All magics in the list produce a useful error message when called without
any arguments.
@travisbot
Copy link

This pull request passes (merged 0776903 into 144f08a).

@Carreau
Copy link
Member

Carreau commented Aug 24, 2012

looks ok to me.
let's try to decrease the number of oppened PR again.
merging in 24h if no objections.

Perhaps we should catch UsageError in run_line_magic and run_cell_magic and suggest the user run %{magic_name}? for help.

is a good idea.

@Carreau
Copy link
Member

Carreau commented Aug 25, 2012

merging.

Carreau added a commit that referenced this pull request Aug 25, 2012
Better error messages for common magic commands.
@Carreau Carreau merged commit 1fe875d into ipython:master Aug 25, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Better error messages for common magic commands.
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