a_xx - wlshiu/my_note GitHub Wiki
/home/nfs *(rw,sync,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=1000)
iThome 鐵人賽
USB
- hidapi · PyPI
- usbx · PyPI
- Windows环境下基于Python的PyUSB库开发USB通讯_notimplementederror: operation not supported or un-CSDN博客
- Using Python and the LIBUSB Library with USB Devices in Linux and Windows based systems.
FreeSimpleGUI
-
tabgroup
#!/usr/bin/env python import FreeSimpleGUI as sg def new_tab(index): return sg.Tab( f'Tab {index}', [[sg.Text(' ~ '.join(f'This is Tab {index}' for k in range(10)))] for j in range(5)], key=f'Tab {index}') tabgroup = sg.TabGroup( [new_tab(i) for i in range(20)](/wlshiu/my_note/wiki/new_tab(i)-for-i-in-range(20)), key='Tabgroup') layout = [ [sg.Column( [tabgroup](/wlshiu/my_note/wiki/tabgroup), scrollable=True, # Scrollable Column vertical_scroll_only=False, # With both of vrtical and horizontal scrollbar size_subsample_height=1, # height same as height of tabgroup size_subsample_width=2, # 1/2 width as width of tabgroup key='Column')], ] window = sg.Window('Scrollable TabGroup', layout, finalize=True) # window finalized required # Hide the vertical scrollbar if not necessary, no such option for scrollable Column element at this moment window['Column'].vsb.pack_forget() window.read(close=True)
rootfs
- z_gen_lite_rootfs.sh
#!/bin/bash
cd .../initramfs
initramfs_dir=$(pwd)
file_inittab=${initramfs_dir}/etc/inittab
file_rcS=${initramfs_dir}/etc/init.d/rcS
file_fstab=${initramfs_dir}/etc/fstab
mkdir -p dev etc home lib mnt proc root sys tmp var
echo -e "::sysinit:/etc/init.d/rcS" > ${file_inittab}
echo -e "::respawn:-/bin/sh" >> ${file_inittab}
echo -e "::askfirst:-/bin/sh" >> ${file_inittab}
echo -e "::cttlaltdel:/bin/umount -a -r" >> ${file_inittab}
chmod 755 ${file_inittab}
mkdir -p ${initramfs_dir}/etc/init.d
echo -e "/bin/mount -a # read 'etc/fstab' to hook file-system" > ${file_rcS}
echo -e "mkdir -p /dev/pts" >> ${file_rcS}
echo -e "mount -t devpts devpts /dev/pts" >> ${file_rcS}
echo -e "echo /sbin/mdev > /proc/sys/kernel/hotplug" >> ${file_rcS}
echo -e "/sbin/mdev -s" >> ${file_rcS}
echo -e "echo ==== Welcome Linux ====" >> ${file_rcS}
chmod 755 ${file_rcS}
echo -e "# device mount-point type option dump fsck" > ${file_fstab}
echo -e "proc /proc proc defaults 0 0" >> ${file_fstab}
echo -e "temps /tmp rpoc defaults 0 0" >> ${file_fstab}
echo -e "none /tmp ramfs defaults 0 0" >> ${file_fstab}
echo -e "sysfs /sys sysfs defaults 0 0" >> ${file_fstab}
echo -e "mdev /dev ramfs defaults 0 0" >> ${file_fstab}
cd ${initramfs_dir}/dev
mknod console c 5 1
mknod null c 1 3
cd ${initramfs_dir}
find . | cpio -o -H newc > ${initramfs_dir}/../rootfs.cpio
gzip -c ${initramfs_dir}/../rootfs.cpio > ${initramfs_dir}/../rootfs.cpio.gz