我有一系列的命令,是从命令行中调用特定的工具程序。具体而言:
root@beaglebone:~# canconfig can0 bitrate 50000 ctrlmode triple-sampling on loopback on
root@beaglebone:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
root@beaglebone:~# cansequence can0 -p
我似乎无法弄清楚(或找到明确的文档)如何编写Python脚本来发送这些命令。我之前没有使用过os模块,但怀疑也许那就是我应该寻找的地方?