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

Syntax for arguments in the %%snoop IPython magic command? #7

Open
alexmojaki opened this issue Jul 15, 2019 · 0 comments
Open

Syntax for arguments in the %%snoop IPython magic command? #7

alexmojaki opened this issue Jul 15, 2019 · 0 comments
Labels
discussion Need to hear people's opinions

Comments

@alexmojaki
Copy link
Owner

Currently it's not possible to pass any arguments to %%snoop. I'd like it to have the same arguments as snoop(). But magic commands are not functions, and arguments work differently. The command simply receives the line containing %%snoop as a string which is then parsed. The convention for most commands is to use shell-like syntax for arguments which are parsed with argparse. So the command might look something like:

%%snoop --depth 2 --watch self.foo,bar[0] --watch-explode thing,bob

Does that look good? I'm not sure I like this convention personally, but I don't use IPython much.

What about short versions of arguments? Should I provide them at all? How do these look?

  • -d for --depth
  • -w for --watch
  • -e (or -x?) for --watch-explode
@alexmojaki alexmojaki added the discussion Need to hear people's opinions label Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Need to hear people's opinions
Projects
None yet
Development

No branches or pull requests

1 participant