加载中
IO相关模块摘抄

File objects are implemented using C’s stdio package and can be created with the built-in open() function cStringIO.StringIO([s]) Unlike the StringIO module, this module is not...

2018/02/24 11:03
49
python函数入参理解

# -*- coding=utf8 -*- import sys #reload(sys) #sys.setdefaultencoding('utf8') def _decode(str):     return str.decode('utf8') def func_test(a1,a2,a3=3,...

2015/12/30 17:27
290
django入门1

创建项目: django-admin startproject testsite1 创建应用: python manage.py startapp myapp1 启动项目 python manage.py runserver 0.0.0.0:8000...

2015/12/20 23:01
49
python编码问题1

在windows的cmd控制台的打印(编码GBK): >>> print repr('哈') '\xb9\xfe' >>> ('\xb9\xfe').decode('gbk') u'\u54c8' >>> ('\xb9\xfe').decode('gb2312') u'\u54c8' >>> ('\xb...

2015/12/16 14:55
53
python 自省1

get_attr() inspect.stack() inspect.stack()[1][3]返回的是函数名???? 如何获取一个函数的名称: 经验:在函数A在调用函数B时在入参处调用函数C,等于函数A调用函数C,没B什么事? impo...

2015/12/10 16:55
52
python异常处理

例子: urllib2.urlopen()函数的调用中,如果http请求响应失败,会抛出urllib2.HTTPError: class HTTPDefaultErrorHandler(BaseHandler):     def http_error_default(self, req, ...

2015/09/17 17:10
121
python 中文

\u4e91\u786c\u76d8\u6d4b\u8bd5

2015/08/07 16:20
40
pylint sphinx 使用

pylint 命令: python -m pylint 显示帮助: python -m pylint --help 将(默认)配置输出到标准输出: python -m pylint --generate-rcfile 指定检查使用的配置文件: python -m pylint --r...

2015/06/30 16:44
161
python自省

dir()可以打印出自省相关成员 '__builtins__', '__doc__', '__file__', '__name__', '__package__', __file__是python模块文件的绝对路径 os.path.dirname(file)返回入参文件所在的目录名称 ...

2015/04/09 15:24
124

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部