摘要:
【python之private variable】 Since there is a valid use-case for class-private members (namely to avoid name clashes of names with names defined by subclasses), there is limited support for such a mechanism, calledname mangling. Any identifier of the form__spam(at least two leading underscores, at mos. 阅读全文
posted @ 2013-09-28 21:27
Tekkaman
阅读(979)
评论(0)
推荐(0)
摘要:
【python实例、类方法、静态方法】 参考:http://blog.163.com/yang_jianli/blog/static/161990006201122411586729/ 阅读全文
posted @ 2013-09-28 20:59
Tekkaman
阅读(215)
评论(0)
推荐(0)
摘要:
【python常用option】 1. -c cmd : program passed in as string (terminates option list) 解析字符串命令,不读cmd之后的option 2. -i : inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; also PYTHONINSPECT=x 运行完输入脚本后,进入交互模式,通常用于自己检测状态 3. -m mod : run libra... 阅读全文
posted @ 2013-09-28 16:22
Tekkaman
阅读(2905)
评论(0)
推荐(0)
摘要:
【access】 表头文件#include 定义函数int access(const char * pathname, int mode); 函数说明access()会检查真实用户是否有权限读/写某一已存在的文件。参数mode有几种情况组合, R_OK,W_OK,X_OK 和F_OK。R_OK,W_OK与X_OK用来检查文件是否具有读取、写入和执行的权限。F_OK则是用来判断该文件是否存在。参考:http://blog.sina.com.cn/s/blog_6a1837e90100uh5d.html 阅读全文
posted @ 2013-09-28 15:33
Tekkaman
阅读(306)
评论(0)
推荐(0)
摘要:
【FD_CLOEXEC】 通过fcntl设置FD_CLOEXEC标志有什么用? close on exec, 意为如果对描述符设置了FD_CLOEXEC,使用execl执行的程序里,此描述符被关闭,不能再使用它,但是在使用fork调用的子进程中,此描述符并不关闭,仍可使用。 阅读全文
posted @ 2013-09-28 15:09
Tekkaman
阅读(743)
评论(0)
推荐(0)
摘要:
【fork后父子进程文件描述问题】 一张图可以浅析的解释: 参考:http://wenku.baidu.com/view/dd51581bff00bed5b9f31d8e.html 阅读全文
posted @ 2013-09-28 14:58
Tekkaman
阅读(279)
评论(0)
推荐(0)
浙公网安备 33010602011771号