代码拉取完成,页面将自动刷新
#!/usr/bin/python
#
# tinycom.py
#
# --powered by liuyajun(20200316)
#################################################################
import os,sys
import serial
import threading
import serial
from tqdm import tqdm
from pathlib import Path
#sys.path[0]
#os.getcwd()
curpath = sys.path[0];
#################################################################
InfoHead = '''
########################################################################
Tinycom :
tinycom is a software for downloading files and communication
based on SCI interface.
-cfg: configure communication parameters and download file list.
-sf: download file.
-com: communication.
-help: help info
-ec / -exit / ctrl+d: exit procedure [tinycom | tinycom-sf | tinycom-com]
########################################################################"
'''
if __name__ == "__main__":
print InfoHead
#os.path.abspath('.');
try:
while True:
cmdstr = raw_input("Tinycom>: ");
cmdstr = cmdstr.strip("\n");
if cmdstr == "-cfg":
os.system("sudo \"" + curpath + "/tinycom_cfg.sh\"");
if cmdstr == "-sf":
os.system("sudo \"" + curpath + "/tinycom_sf.sh\"");
if cmdstr == "-com":
os.system("sudo python \"" + curpath + "/tinycom_com.py\"");
if cmdstr == "-help":
print " -cfg configure communication parameters and download file list.";
print " -sf download file.";
print " -com communication.";
print " -help help info";
print " -ec terminate communication";
print " -ec / -exit / ctrl+d: exit procedure [tinycom | tinycom-sf | tinycom-com]"
if cmdstr == "-exit":
print "# END-tinycom"
break;
if cmdstr == "-ec":
print "# END-tinycom"
break;
#else:
# print " [",cmdstr,"]"" is not an option for tinycom!"
except:
print "# END-tinycom"
exit();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。