随笔分类 -  Python

Learn a litter Python everyday.
摘要:安装 我使用以下命令安装virtualenv是出现的问题: 然后换成以下命令就能成功安装了: 阅读全文
posted @ 2017-04-20 11:37 炉石传说 阅读(1727) 评论(0) 推荐(0)
摘要:单线程 任务多的时候,一件一件做,排个先后。一个任务没有完成的时候,不能开始新任务。 多线程 同时开展多个任务。 python提供了两个模块来实现多线程:thread 和threading。threading通过对thread模块进行二次封装,提供了更方便的API来操作线程。本文只对threadin 阅读全文
posted @ 2016-04-15 11:19 炉石传说 阅读(465) 评论(0) 推荐(0)
摘要:Python提供的XMLRPC的解决方案用法很简单: 首先,就好像在编写普通的程序那样子编写服务器将要运行的服务 然后,使用SimpleXMLRPCServer模块创建XMLRPC服务器,在其中注册服务器将提供的函数或者对象(即上一步所写的那些服务)。 最后,在客户端内使用xmlrpclib.Ser 阅读全文
posted @ 2016-04-15 10:47 炉石传说 阅读(1126) 评论(0) 推荐(0)
摘要:class Transport: """Handles an HTTP transaction to an XML-RPC server.""" # client identifier (may be overridden) user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % __version__ #if true, we'll request gzip encoding accept_gzip_encoding = True # if pos 阅读全文
posted @ 2014-01-01 14:52 炉石传说 阅读(489) 评论(0) 推荐(0)
摘要:sys._getframe([depth]) Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls below the top of the stack. If that is deeper than the call stack, ValueError is raised. The default for depth is zero, returning the frame at the top of the 阅读全文
posted @ 2013-12-31 23:37 炉石传说 阅读(8792) 评论(0) 推荐(0)