python使用urllib访问url,pythonurlliburl,python使用urll
python使用urllib访问url,pythonurlliburl,python使用urll
python使用urllib访问url:
[Python]代码
# -*- coding: cp936 -*-import Tkinterimport urllibclass Window: def __init__(self,root): self.root = root self.entryUrl=Tkinter.Entry(root) self.entryUrl.place(x=5,y=15) self.get=Tkinter.Button(root,text='download',command=self.Get) self.get.place(x=120,y=15) self.edit=Tkinter.Text(root) self.edit.place(y=50) def Get(self): url = self.entryUrl.get() page=urllib.urlopen(url) data=page.read() self.edit.insert(Tkinter.END,data) page.close()root=Tkinter.Tk()window=Window(root)root.minsize(600,480)root.mainloop()
相关内容
- Python使用split使用多个字符分隔字符串,pythonsplit,Pyth
- python使用gc.get_objects()查看运行时对象,,从python2.2开始
- Python计算单词距离代码,python计算单词,#!/usr/bin/e
- Python处理gzip压缩过的网页,python处理gzip压缩,大多数网
- Python判断一个数字是否为素数,python素数,如下代码判断
- python urllib2使用ProxyHandler通过代理访问网页,,在urllib
- python webpy 输出json响应,webpyjson,webpy输出json首
- webpy获得用户post或者get的数据,上传文件示例,webpyp
- python getaddrinfo() 基本使用代码,pythongetaddrinfo,import sy
- Execute a function on multiple argument sets in parallel using a thre
评论关闭