Python - wlshiu/my_note GitHub Wiki
Python
-
Install notebook
$ pip3 install jupyter notebook -
Execute ipython
$ jupyter notebook
Python OpenOCD
Python jLink
- PyLink:使用 Python 控制您的 J-Link | 技术文章 | 汇顶科技开发者社区
- square/pylink: Python Library for device debugging/programming via J-Link
- PyLink完整教程:用Python玩转SEGGER J-Link嵌入式调试-CSDN博客
- 利用JTAG菊花链技术实现多设备精准控制的软件方案-CSDN博客
FreeSimpleGUI
-
test-tab
#!/usr/bin/env python import FreeSimpleGUI as sg # Simple example of TabGroup element and the options available to it sg.theme('Dark Red') # Please always add color to your window # The tab 1, 2, 3 layouts - what goes inside the tab tab1_layout = [[sg.Text('Tab 1')], [sg.Text('Put your layout in here')], [sg.Text('Input something'), sg.Input(size=(12,1), key='-IN-TAB1-')]] tab2_layout = [sg.Text('Tab 2')](/wlshiu/my_note/wiki/sg.Text('Tab-2')) tab3_layout = [sg.Text('Tab 3')](/wlshiu/my_note/wiki/sg.Text('Tab-3')) tab4_layout = [sg.Text('Tab 3')](/wlshiu/my_note/wiki/sg.Text('Tab-3')) # The TabgGroup layout - it must contain only Tabs tab_group_layout = [[sg.Tab('Tab 1', tab1_layout, font='Courier 15', key='-TAB1-'), sg.Tab('Tab 2', tab2_layout, visible=False, key='-TAB2-'), sg.Tab('Tab 3', tab3_layout, key='-TAB3-'), sg.Tab('Tab 4', tab4_layout, visible=False, key='-TAB4-'), ]] # The window layout - defines the entire window layout = [[sg.TabGroup(tab_group_layout, enable_events=True, key='-TABGROUP-')], [sg.Text('Make tab number'), sg.Input(key='-IN-', size=(3,1)), sg.Button('Invisible'), sg.Button('Visible'), sg.Button('Select')]] window = sg.Window('My window with tabs', layout, no_titlebar=False) tab_keys = ('-TAB1-','-TAB2-','-TAB3-', '-TAB4-') # map from an input value to a key while True: event, values = window.read() # type: str, dict print(event, values) if event is None: break # handle button clicks if event == 'Invisible': window[tab_keys[int(values['-IN-'])-1]].update(visible=False) if event == 'Visible': window[tab_keys[int(values['-IN-'])-1]].update(visible=True) if event == 'Select': # print(tab_keys[int(values['-IN-'])-1]) # window[tab_keys[int(values['-IN-'])-1]].select() window['-TAB3-'].select() window.close()