![](/img/trans.png)
[英]How to create a new jupyter notebook cell and update the cell using notebook server rest api's or python code?
[英]How To Access a jupyter Notebook cell using a button click?
我可以使用 tkinter 桌面應用程序訪問 Jupyter Notebook Cell 嗎? 或者我可以通過單擊按鈕在單元格中粘貼代碼嗎?
有一個模塊調用subprocess
,你可以用它來打開jupyter筆記本Tkinter的一起。 看看這段代碼——
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
將打開 cmd 並運行jupyter notebook
,然后,這將在瀏覽器中打開 jupyter notebook 這對我有用! 第一次運行它可能需要一些時間。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.