python 模块
来源:互联网 发布:上证综合指数数据 编辑:程序博客网 时间:2024/06/05 11:31
python 模块库 pypi.python.org
内置模块的文档docs.python.org
常用模块
urllib urllib2 网络
datetime time 时间
os 系统
pickle 对象序列化 常用数据格式 json xml
bsddb 操作bdb的模块,bdb是著名的Berkeley DB,它的性能非常好
logging 日志
引入模块 3中方法
import linecache.checkcache
from linecache import checkcache
from linecache import *(__all__=['checkcache'] 定义的方法)
调用其他模块的内容(如 mm文件夹下的__init__.py定义__all__=['test'] test.py的hash())
from mm import test 或者
from mm.test import hash
如果不在同一目录下如何导入
import sys
sys.path.append('绝对路径')
然后再import
with sth() as s 语句 必须实现 __enter__ 和 __exit__方法 s相当于__enter__的返回值
0 0
- python模块 ---logging模块
- python模块-re模块
- python模块 - functools模块
- python 模块 模块文件
- python模块 - pickle模块
- python模块 - copy模块
- python模块
- python 模块
- python-模块
- python 模块
- python模块
- python 模块
- python模块
- python 模块
- python 模块
- 模块-python
- python 模块
- python模块
- Tomcat 简介
- poj 2096 概率dp
- Lakes.AERMOD.View.v8.9.0 1CD大气扩散模型软件包
- Fisher线性判别函数+c代码
- CallableStatement用法
- python 模块
- poj 2251 Dungeon Master(三维BFS)(中等)
- UE4学习笔记5th
- window7 64位 python2.7 安装libsvm和liblinear
- iOS searchable 去背景色
- C语言文件操作函数总结
- 网站项目系列 第一篇
- linux初学(六)之linux系统基础
- JS 生成随机色,产生验证码,获取URL中的"?"