‘壹’ python基础教程
2020年最新Python零基础教程(高清视频)网络网盘
链接:
若资源有问题欢迎追问~
‘贰’ 请问python如何使用tk绘制图片这种表格,并且可以在空白处添加数据后保存文件
这明显不是 tk 干的活啊。 这应该是一张web 表格,或者 WORD 模板 才合适。
‘叁’ python教程哪里下载
一、Python入门到进阶的 廖雪峰 Python & JS & Git 教程PDF版 链接:‘肆’ python TK怎么让他输入什么下载什么
deftest():
text=s.get()
.............
.............
print(text)
s=StringVar()
entry=Entry(...............,textvariable=s)
button=Button(.................,command=test)
entry.grid(.............)
button.grid(...........)
以上,主要是要添加一个textvariable参数,可以多看看Tk相关知识。具体应用可以学习参考这个项目:网页链接
望采纳
‘伍’ python modbus_tk我想看看这个怎么用,怎么样可以看到例子和详细的教程
IF是一个逻辑功能。
C2 = IF(B2> 100,B2,100)
解释:在B2单元格中的数据大于100,实际数据的单元格B2,或等于100
‘陆’ python3.0 tk的使用
有什么问题吗 ,刚好之前写过一些关于py3 tk的东西,可以一起探讨一下,给你一个例子:
importurllib,urllib.request
importos,re
fromtkinterimport*
importtkinter.ttk
importctypes
importthreading,time
defRunApp():
handler=None;
operator="open";
fpath="D:SoftWareChromeChromechrome.exe";
param='-user-data-dir="D:SoftWareChromeprofil';
dirpath='D:SoftWareChromeChrome';
ncmd=1;
shell32=ctypes.windll.LoadLibrary("shell32.dll");
shell32.ShellExecuteW(handler,operator,fpath,param,dirpath,ncmd);
defcallbackfunc(blocknum,blocksize,totalsize):
'''回调函数
@blocknum:已经下载的数据块
@blocksize:数据块的大小
@totalsize:远程文件的大小
'''
percent=100.0*blocknum*blocksize/totalsize
ifpercent>100:
percent=100
prb['value']=percent
lbjd['text']='更新进度%0.2f'%percent+'%'
#print(percent)
defprbadd():
prb['value']+=1
defLoad():
time.sleep(0.5)
t1=threading.Thread(target=down)
t1.start()
defdown():
nfn=vel+'_chrome_installer.exe'
print('hehe')
urllib.request.urlretrieve(link,nfn,callbackfunc)
os.system('update.bat'+nfn)
#print('更新完成')
#os.system('PAUSE')
#os.system('''startD:SoftWareChromeChromechrome.exe-user-data-dir="D:SoftWareChromeprofil"''')
RunApp()
root.quit()
html=urllib.request.urlopen('http://down.tech.sina.com.cn/page/40975.html').read().decode('gbk')
t=re.search('(?<=down_load_url"href=")[^"]+(?="target="_blank"class="f14b">正式版-)',html)
link='http://down.tech.sina.com.cn'+t.group(0)
title=html[html.index('<title>')+7:html.index('</title>')]
vel=title[title.rindex('/')+1:title.index('】')-3]
ls=os.listdir('../Chrome/')
forfninls:
iffn.find('exe')==-1:
oldvel=fn
break
ifoldvel!=vel:
root=Tk()
root.title('Chrome更新工具')
#root.attributes("-toolwindow",1)
lbjd=Label(root,text='更新进度')
lbjd.pack()
prb=tkinter.ttk.Progressbar(root,length=400,maximum=100.0,value=0)
prb.pack()
sw=root.winfo_screenwidth()
sh=root.winfo_screenheight()
root.geometry('410x50+'+str(int((sw-410)/2))+'+'+str(int((sh-50)/2)))
#root.bind('<Visibility>',Load)
Load()
root.mainloop()
else:
#print('已经是最新版本')
RunApp()
#os.system('''startD:SoftWareChromeChromechrome.exe-user-data-dir="D:SoftWareChromeprofil"''')
#print(title)
这个是我自己更新chrome用的