2

Can I access Jupyter Notebook Cell using tkinter desktop application ? OR Can I past code in a cell on a button click ?

1 Answer 1

1

There is a module called subprocess which you can use to open jupyter notebook along with tkinter. Look at this code -

import tkinter as tk
import subprocess

root = tk.Tk()

root.title('Jupyter Notebook')

def open_jup():
    p = subprocess.Popen(["start", "cmd", "/k", "jupyter notebook"], shell = True)


button = tk.Button(root,text='OPEN Jupyter Notebook',command=open_jup)
button.pack(fill='both')


root.mainloop()

Subprocess.Popen will open the cmd and run the jupyter notebook and then, this will open the jupyter notebook in the browser This worked for me ! It can take some time the first time you run this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.