当前位置: 首页 > news >正文

全球优秀企业网站做营销看的网站有哪些内容

全球优秀企业网站,做营销看的网站有哪些内容,上海公司章程在哪里可以查询打印,做网站总结工具效果如下如所示 下面简单介绍一下操作流程 1.打开PyCharm软件 2.创建一个工程 3.给该工程命名 4.在main.py里面黏贴如下的代码 # This is a sample Python script. # Press ShiftF10 to execute it or replace it with your code. # Press Double Shift to search everyw…工具效果如下如所示 下面简单介绍一下操作流程 1.打开PyCharm软件 2.创建一个工程 3.给该工程命名 4.在main.py里面黏贴如下的代码 # This is a sample Python script. # Press ShiftF10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. import serial import threading import timefrom tkinter import * from tkinter.ttk import * from tkinter import messageboxdef open_serial(a,b,c,d,e):global serprint(串口号:,a)print(波特率:,int(b))print(数据位:,c)print(停止位:,d)print(检验位:,e)bytesize serial.EIGHTBITSif c 7:bytesize serial.SEVENBITSprint(select SEVENBITS)if c 6:bytesize serial.SIXBITSprint(select SIXBITS)if c 5:bytesize serial.FIVEBITSprint(select FIVEBITS)stopbitsize serial.STOPBITS_ONEif d 2:stopbitsize serial.STOPBITS_TWOprint(select STOPBITS_TWO)paritysel serial.PARITY_NONEif e Odd:paritysel serial.PARITY_ODDprint(select Odd)if e Even:paritysel serial.PARITY_EVENprint(select EVEN)serserial.Serial(porta,baudrateint(b),bytesizebytesize,stopbitsstopbitsize,parityparitysel,timeout0.5)# ser serial.Serial(COM4, 9600, timeout1)def print_hi(name):# Use a breakpoint in the code line below to debug your script.print(fHi, {name}) # Press CtrlF8 to toggle the breakpoint.def print_log(log):time_start time.time()date time.strftime(%Y-%m-%d %H:%M:%S, time.localtime())print(f{date}-{log})def recv_hander():while 1:if ser.is_open:data ser.read(1024).decode(gbk)print_log(data)msgshow.insert(END, data)def create_recv_thread():global thth threading.Thread(targetrecv_hander)th.setDaemon(True)th.start()def msg_send():msg msginp.get()print_log(fsend{msg})if ser.is_open:ser.write(msg.encode(gbk))def open_com():print_log(open com)com_val comnum.get()baud_val baud.get() # 获取当前选定项目的值databit_val databit.get()stopbit_var stopbit.get()parity_var parity.get()print(com_val)print(baud_val)open_serial(com_val, baud_val, databit_val, stopbit_var, parity_var)if ser.is_open:messagebox.showinfo(标题,串口打开成功)create_recv_thread()def close_com():print_log(close com)if ser.is_open:ser.close()# Press the green button in the gutter to run the script. if __name__ __main__:print_hi(PyCharm)root Tk()root.geometry(768x512)root.title(串口工具)comnumvar StringVar()baudvar StringVar()databitvar StringVar()stopbitvar StringVar()parityvar StringVar()lb_com Label(root, text串口号)lb_com.place(relx0.01, rely0.05, relwidth0.1, relheight0.1)comnum Combobox(root, textvariablecomnumvar, values[COM1, COM2, COM3, COM4, ])comnum.place(relx0.08, rely0.075, relwidth0.1)comnum.current(3)lb_baud Label(root, text波特率)lb_baud.place(relx0.01, rely0.12, relwidth0.1, relheight0.1) #add 0.045baud Combobox(root, textvariablebaudvar, values[115200, 38400, 9600, 4800, ])baud.place(relx0.08, rely0.145, relwidth0.1) #add 0.025baud.current(2)lb_databit Label(root, text数据位)lb_databit.place(relx0.01, rely0.19, relwidth0.1, relheight0.1) #add 0.045databit Combobox(root, textvariabledatabitvar, values[8, 7, 6, 5, ])databit.place(relx0.08, rely0.215, relwidth0.1) #add 0.025databit.current(0)lb_stopbit Label(root, text停止位)lb_stopbit.place(relx0.01, rely0.26, relwidth0.1, relheight0.1)stopbit Combobox(root, textvariablestopbitvar, values[1, 2, ])stopbit.place(relx0.08, rely0.285, relwidth0.1)stopbit.current(0)lb_parity Label(root, text校验位)lb_parity.place(relx0.01, rely0.33, relwidth0.1, relheight0.1)parity Combobox(root, textvariableparityvar, values[None,Odd,Even,])parity.place(relx0.08, rely0.355, relwidth0.1)parity.current(0)btnopen Button(root, text打开串口, commandopen_com)btnopen.place(relx0.01, rely0.45, relwidth0.1, relheight0.05)btnclose Button(root, text关闭串口, commandclose_com)btnclose.place(relx0.12, rely0.45, relwidth0.1, relheight0.05)lb1 Label(root, text串口数据接收)lb1.place(relx0.25, rely0.05, relwidth0.7, relheight0.1)msgshow Text(root)msgshow.place(relx0.25, rely0.15, relwidth0.7, relheight0.3)lb2 Label(root, text串口数据发送)lb2.place(relx0.25, rely0.45, relwidth0.7, relheight0.1)msginp Entry(root)msginp.place(relx0.25, rely0.55, relwidth0.7, relheight0.1)btnsend Button(root, text发送, commandmsg_send)btnsend.place(relx0.35, rely0.86, relwidth0.3, relheight0.1)root.mainloop()# See PyCharm help at https://www.jetbrains.com/help/pycharm/ 5.执行脚本 6.如果有提示“No module named serial”需要安装 pyserial在终端命令行输入pip install pyserial如下图所示 7.在windows下安装一对虚拟串口可以下载vspd安装最终结果如下所示 8.使用第三方工具进行数据互发测试 9.将该工具打包成exe可执行文件 在命令行终端输入python -m pysimplegui-exemaker.pysimplegui-exemaker 最后点击“Make EXE”生成如下所示的exe文件
http://www.dnsts.com.cn/news/84487.html

相关文章:

  • 网站网站建设教程网站开发项目需求
  • 检查网站打开速度wordpress 4.9.2
  • 网站信息发布系统网站产品内容在数据库
  • 图片展示 网站有货源怎么做电商
  • 免费注册的网站邢台建网站
  • 网站变慢的原因网站中如何做图片轮播
  • 手机网站如何排版wordpress是怎么添加登录的
  • 最专业的网站建设公司哪家好游戏外包公司是干嘛的
  • dede网站转移晋中seo排名
  • 铜川做网站的公司电话wordpress 全屏幻灯片
  • 怎么搭建自己公司网站成武城乡住房建设局网站
  • 手机网站仿站教程国外做名片的网站
  • 定制化网站建设中信建设有限责任公司招投标
  • 58同城推广能免费做网站吗多光营销软件网站
  • 网站是不是每年都要续费wordpress点击文章404
  • 免费的代码分享网站做商城网站要什么证件
  • 爬取漫画数据做网站深圳外贸网站推广公司
  • 邢台建设专业网站做装饰画的行业网站
  • 石家庄建立网站的公司软文营销常用的方式
  • 东莞龙岗网站建设品牌建设论文
  • 网站怎么做等级保护天津网站建设 企航互联
  • 哪些网站需要备案鸿星尔克品牌策划方案
  • 网站建设询价采购wordpress 备份 教程
  • 湖北省建设质量安全协会网站平板电脑可以做淘宝网站吗
  • 佛山网站建设策划网站开发相关英文单词
  • 下载建设银行官方网站下载云南城乡建设网站
  • 公司做分享网站好吗品牌营销策划十大要点
  • 做网站上传服务器吗无锡网站建设电话
  • 网页设计制作一个餐饮网站app软件开发制作公司
  • 网站开发教程 视频教程工程承包合同协议书