
python
文章平均质量分 51
span76
这个作者很懒,什么都没留下…
展开
-
python 经验: from x import * 影响全局变量使用
最近写 python 程序, 发现一个比较 trick 的地方 ------------------------- a.py ------------------------- PWD = None def func1(): global PWD PWD="pwd" print "PWD in func1 is: " + PWD -----原创 2013-07-12 10:05:54 · 10623 阅读 · 4 评论 -
update fabric from 1.3 to 1.8
fabric 是个挺好的东西,就是它基于 Python 和其他包,这个东西都在更新, 原来使用得挺好的,到新环境莫名出些问题,自己也没办法解决,只有更新软件 以前我开发基于 fabric 1.3 , python2.6 的东西运行没有问题,新装 ubuntu 12.04 就出现用 sudo("reboot") 后,连接就断了,没办法解决 把 python2.7 降级到 2.6有原创 2014-02-24 13:23:38 · 1500 阅读 · 0 评论 -
python code 保密
python 开发效率高,但就是太容易反编译 使用 uncopyle 反编译几乎得到和原代码相同的东西 git clone https://github.com/gstarnberger/uncompyle.git cd uncompyle/ sudo ./setup.py install uncompyler.py thank_goodness_this_still_exist原创 2015-01-12 11:34:00 · 3679 阅读 · 0 评论 -
编写 Window 下 Python C程序
1)下载 mingw-get-setup.exe 安装需要gcc 等 2)编成C程序 #include class Foo{ public: void bar(){ std::cout << "Hello" << std::endl; } }; extern "C" { Foo* Foo_new(){ re原创 2015-01-21 13:22:55 · 677 阅读 · 0 评论