摘要:
#coding=utf-8 import sys import time f = open("demo.txt") #打开文件,python3中可以加参数encoding = "utf-8" #print (f.read())#文件光标会跳到最后 #f.write("我今天学习了吗") #w表示写,r表示读,a表示追加,r+ 读写,w+写读,a+追加读,rb二进制文件读(网络传输) #wb... 阅读全文
摘要:
#coding=utf-8 import sys s = "你好啊" print type(s) print (sys.getdefaultencoding()) s1 = s.decode("utf-8") #从utf-8转换为unicode s2= s1.encode("gbk") #从unic 阅读全文
摘要:
#coding=utf-8 import wx import time import os class MyApp(wx.App): def __init__(self): wx.App.__init__(self) def OnInit(self): self.Frame = wx.Frame(p... 阅读全文
摘要:
#coding=utf-8 import wx class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"python菜单栏练习") self.panel = wx.Panel(self) #设置菜单栏与子菜单... 阅读全文
摘要:
#coding=utf-8 import wx import time class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"多模测试热补丁工具",size = (800,600)) panel = wx.Panel... 阅读全文
摘要:
#coding=utf-8 import wx class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"多模测试热补丁工具",size = (800,600)) panel = wx.Panel(self) ... 阅读全文
摘要:
#coding=utf-8 import wx class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"多模测试热补丁工具",size = (800,600)) panel = wx.Panel(self) ... 阅读全文
摘要:
#coding=utf-8 import wx class MyApp(wx.App): def __init__(self): wx.App.__init__(self) def OnInit(self): self.frame = wx.Frame(parent=None,title = "多模自动化测试工具... 阅读全文
摘要:
#coding=utf-8 import socket import os import sys # reload(sys) # sys.setdefaultencoding('utf-8') server = socket.socket() #创建实例 server.bind(('localhost',6969)) #绑定要监听的端口 server.listen(2)... 阅读全文
摘要:
#coding=utf-8 import os import socket client = socket.socket() #申明socket类型,同时生成socket连接对象 client.connect(('localhost',6969)) #传入元组,连接到服务端 while True: msg = raw_input("please input:").strip() ... 阅读全文