运行shell命令
在命令前加!
即可。如!sh your_scripts.sh
。
交互界面
import ipywidgets
from ipywidgets import interact, interactive
from ipywidgets import HBox, VBox, Dropdown, IntSlider, Checkbox, Layout
def ATK(a, b, c):
print('{}等级为{}时基础攻击力为:{}'.format(a, c, '不知道'))
layout = Layout(width='20%', height='30px')
a = Dropdown(description='人物:', options=['李白', '王昭君', '韩信'], layout=layout)
b = Checkbox(description='皮肤', value=True)
c = IntSlider(description='等级:',min=0,max=15,step=1, value=10, layout=layout)
ui = VBox([HBox([a, b]), c])
out = ipywidgets.interactive_output(ATK, {'a':a, 'b':b, 'c':c})
display(ui, out)
jupyter交互界面
to be continue
网友评论