上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: import os r = os.path.dirname(__file__) b = 'task' os.mkdir(r+'/'+b) a = ['bin','db','lib','config','log'] for i in a: os.mkdir(r+'/'+b+'/'+i) 嵌套文件夹创建import os r = os.path.dirname(__file__)... 阅读全文
posted @ 2017-01-05 17:51 200ML 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 网络编程 Socket(TCP,IP)套接字 服务端 运行起来, 客户端 客户端 客户端 客户端 服务端: import socket sk = socket.socket() #绑定端口号 sk.bind(('127.0.0.1',9999,)) #接收客户请求 sk.listen(5) #链接客户端地址信息 while True: # conn,a... 阅读全文
posted @ 2017-01-05 17:06 200ML 阅读(175) 评论(0) 推荐(0) 编辑
摘要: ''' 网络编程 Socket(TCP,IP)套接字 服务端 运行起来, 客户端 客户端 客户端 客户端 服务端: import socket sk = socket.socket() #绑定端口号 sk.bind(('127.0.0.1',9999,)) #接收客户请求 sk.listen(5) #链接客户端地址信息 while True: # conn,ad... 阅读全文
posted @ 2017-01-05 17:03 200ML 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 呵呵哒....class clss: #等于触发对象 clss() __static = None def __init__(self): pass @staticmethod def static_def(): if clss.__static: return clss.__static ... 阅读全文
posted @ 2017-01-01 21:10 200ML 阅读(112) 评论(0) 推荐(0) 编辑
摘要: '''一,面向对象的进阶 成员 (字段 静态字段(每个对象都有一份用 (区别:没self)),普通字段(每个对象都不同的数据用(区别:有self)) 方法 静态方法(无需使用对象封装的内用用 (区别:没self)),类方法,普通方法(使用对象中的数据用(区别:有self)), 特性 普通特性(将方法伪造成字段的方法去执行,前提... 阅读全文
posted @ 2017-01-01 10:31 200ML 阅读(488) 评论(0) 推荐(0) 编辑
摘要: class A: def bar(self): print('bar') self.f1() class B(A): def f1(self): print('B') class C: def f1(self): print('C') class D(C,B): pass d1 = B() d1... 阅读全文
posted @ 2016-12-31 20:48 200ML 阅读(214) 评论(0) 推荐(0) 编辑
摘要: class oldboy: def __init__(self,bk): self.arg = bk self.name = 'alex' def func_1(self): print(self.arg) print(self.name) return True def func_2(s... 阅读全文
posted @ 2016-12-30 18:51 200ML 阅读(139) 评论(0) 推荐(0) 编辑
摘要: import pypy from lib.test(也就是文件路径) import py (文件名) r = __import__('lib.test.py(文件路径)',formlist = True(要声明才能找到)) ''' 反射根据用户输入寻找模块的东西''' inp = input('输入模块') inp_1 = __import__(inp) inp_2 = input('输入函数... 阅读全文
posted @ 2016-12-30 10:55 200ML 阅读(109) 评论(0) 推荐(0) 编辑
摘要: import urllib import requests from xml.etree import ElementTree as ET root = ET.XML(open('D:\E\semantic\\a.xml','r',encoding = 'utf-8').read()) print(root.tag) for i in root: print(i.tag,i.attr... 阅读全文
posted @ 2016-12-28 17:20 200ML 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 公共Webservice 网络上可供测试的Web Service腾讯QQ在线状态 WEB 服务Endpoint: http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx Disco: http://www.webxml.com.cn/ 阅读全文
posted @ 2016-12-28 14:42 200ML 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页