摘要: 一 安装pip install virtualenvwrapper- 把下面这句加到~/.bash_profile里面,如不嫌麻烦,也可以每次都手动执行。source /usr/local/bin/virtualenvwrapper.sh 初始化 virtualenv 的一些数据2、创建虚拟环境... 阅读全文
posted @ 2014-08-20 10:15 flamedancer 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 一. 加 ssh-key二. git clone使用git clone命令从github上同步github上的代码库时,如果使用SSH链接(如我自己的beagleOS项目:git@github.com:DamonDeng/beagleOS.git),而你的SSH key没有添加到github帐号... 阅读全文
posted @ 2014-06-05 12:14 flamedancer 阅读(223) 评论(0) 推荐(0) 编辑
摘要: [A.py] from B import D class C:pass [B.py] from A import C class D:pass为什么执行A的时候不能加载D呢?如果将A.py改为:import B就可以了。这是怎么回事呢?RobertChen:这跟Python内部import的机制是有... 阅读全文
posted @ 2014-01-08 11:51 flamedancer 阅读(913) 评论(0) 推荐(0) 编辑
摘要: 比直接eval更好的方法>>>import ast>>>ast.literal_eval("{'muffin' : 'lolz', 'foo' : 'kitty'}"){'muffin':'lolz','foo':'kitty'}用 json 遇到问题:>>> import jsonjson.lo... 阅读全文
posted @ 2013-12-23 12:29 flamedancer 阅读(518) 评论(0) 推荐(0) 编辑
摘要: api 文档importlib.import_module(name,package=None)Import a module. Thenameargument specifies what module to import in absolute or relative terms (e.g. e... 阅读全文
posted @ 2013-12-20 19:18 flamedancer 阅读(653) 评论(0) 推荐(0) 编辑
摘要: 秒杀世界上最难的九宫数独题!网传11级的数独题 problems\test.txt:8 0 0 0 0 0 0 0 0 0 0 3 6 0 0 0 0 0 0 7 0 0 9 0 2 0 0 0 5 0 0 0 7 0 0 0 0 0 0 0 4 5 7 0 0 0 0 0 1 0 0 0 3 0 ... 阅读全文
posted @ 2012-11-09 13:44 flamedancer 阅读(329) 评论(0) 推荐(0) 编辑