随笔分类 -  Python

摘要:最近在用python写游戏运维管理的后台,待功能完善后放源码,大致功能如下: 有兴趣的可以加我一起来做。 阅读全文
posted @ 2016-02-01 14:43 xiewb 阅读(1786) 评论(4) 推荐(0)
摘要:如果你的电脑时间老是不对,可以用下面的脚本,放任务管理器里面运行。import osimport timeimport ntplibdef SyncTime(ntpserv): try: c = ntplib.NTPClient() print 'Synctime ... 阅读全文
posted @ 2015-07-09 09:23 xiewb 阅读(506) 评论(0) 推荐(0)
摘要:使用python模块:paramiko,optparse__author__ = 'Administrator'import paramikoimport sysfrom optparse import OptionParserimport osdef exit_code(code): os.... 阅读全文
posted @ 2015-07-07 13:59 xiewb 阅读(407) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*-import reimport urllib2def getimage(pagenum): url = 'http://m.qiushibaike.com/text/page/%s?s=4784059' % pagenum req = url... 阅读全文
posted @ 2015-06-25 17:26 xiewb 阅读(227) 评论(0) 推荐(0)
摘要:import base64import uuidbase64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes) 阅读全文
posted @ 2015-06-15 10:55 xiewb 阅读(158) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*-class Person:'''a doc string for you class'''population = 0def __init__(self,name):'''initial the Person's data'''self.name = n... 阅读全文
posted @ 2015-06-12 17:18 xiewb 阅读(140) 评论(0) 推荐(0)