1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/liuliu9520-tinycom

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
tinycom.py 1.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
fengyuan Отправлено 18.03.2020 09:52 120e9bd
#!/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();

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/liuliu9520-tinycom.git
git@api.gitlife.ru:oschina-mirror/liuliu9520-tinycom.git
oschina-mirror
liuliu9520-tinycom
liuliu9520-tinycom
master