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 option to show details from code_info #5

Open
jtpio opened this issue Sep 30, 2018 · 0 comments
Open

Add option to show details from code_info #5

jtpio opened this issue Sep 30, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@jtpio
Copy link
Owner

jtpio commented Sep 30, 2018

It would be interesting to have an option in the "Advanced Settings Editor" to show the details that come from dis.code_info, and display it on the top of the panel (before the bytecode) or in a different JupyterLab widget.

For example:

import dis

code_to_eval = """
a = 2
b = a + 1
"""

code = compile(code_to_eval, '<string>', 'exec')
code_info = dis.code_info(code)
print(code_info)

would output:

Name:              <module>
Filename:          <string>
Argument count:    0
Kw-only arguments: 0
Number of locals:  0
Stack size:        2
Flags:             NOFREE
Constants:
   0: 2
   1: 1
   2: None
Names:
   0: a
   1: b
@jtpio jtpio added the enhancement New feature or request label Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant