
python
文章平均质量分 66
anydroid
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
aptana django syncdb locale.getdefaultlocale()错误解决方案
问题:从windows转移到mac下,之后,执行syncdb报错: Creating tables ... Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table auth_user_user_permissions Cre原创 2012-12-09 00:40:27 · 734 阅读 · 0 评论 -
关于python import的总结
一、分类和形式 import 共分两种:相对import、绝对import。 绝对import有两种形式: (1).from pkg. sub import (xxx,yyy,zzz) (2).import pkg.sub.mod (1)会引起各pkg中__init__.py的执行。 相对import只有一个形式: 在(1)的from部分加n个‘.',一个.表示当前目录,依次往上原创 2012-12-23 21:21:20 · 714 阅读 · 0 评论 -
关于python模块循环导入(circular imports)/相对导入(Relative Imports)/绝对导入(Absolute Imports)的官方资料
In general, don’t usefrom modulename import*.Doing so clutters the importer’s namespace. Some peopleavoid this idiom even with the few modules that were designed to be imported in this manner. Modul原创 2012-12-23 10:51:04 · 7003 阅读 · 0 评论 -
对于python官方doc中相对路径重复init的理解和实验
官方doc中明确推荐使用绝对路径来引入module: ’‘ Never use relative package imports. If you’re writing code that’s in thepackage.sub.m1module and want toimportpackage.sub.m2,do not just writeimport m2, even thou原创 2012-12-24 00:50:08 · 734 阅读 · 0 评论