How to run python code from jupyterlab extension

I want to be able to run python code from this extension. how can i do that? please show me. thanks

1 Like

I would suggest you to check how this is done by extisting extensions (for example variable inspector). As this is a very broad question it is hard to answer comprehensively without someone putting many hours into this, however there already is an answer covering the basics in jupyter notebook - How do I interact a JupyterLab extension with Python kernel? - Stack Overflow.

1 Like