
编程语言-python
文章平均质量分 81
_uniqs
由于种种原因,本博客已移植至
https://www.cnblogs.com/uniqs/
给您带来不便深表谦意
展开
-
python2.7.2依赖库
http://www.tuicool.com/articles/FjmA3u模块依赖说明_bsddbbsddbInterface to Berkeley DB library。Berkeley数据库的接口_cursesncursesTerminal handling for character-cell displays。转载 2016-02-15 17:46:48 · 2632 阅读 · 0 评论 -
python help("modules") 打印help内容到文件的实现代码从pydoc中扒出来
pydoc在早期的版本支持不是非常好,想打印help('modules')要更新,要是不想更新,可尝试此办法直接打印出来,把pydoc中的东西给扒出来了。import sys, os, impdef pathdirs(): """Convert sys.path into a list of absolute, existing, unique paths."""原创 2016-08-20 15:04:29 · 1956 阅读 · 0 评论 -
c++转python
前两天有个一万多行的C++项目需要转PYTHON,逻辑非常复杂,要想看懂逻辑再用PYTHON写一遍预期时间比直接转要长,所以大家决定转PYTHON,遇到一些坑,这里简记一下。 最大的坑是数据结构,PYTHON没有数组,只能用LIST,C++的函数里数组直接传地址进去,可以进行各种操作,尤其是二维数组。PYTHON只能用LIST,二维数组只能嵌套LIST。C++可以传一个类对象的引原创 2017-11-13 13:37:45 · 34257 阅读 · 2 评论 -
python for循环里的参数统统加上int()防止报float类型的错误
file_object = open('GameLogic.py', 'r')output = open('gamelogic_for_int.py', 'w')while True: line = file_object.readline() if not line: break theplaceoffor = line.find('for')原创 2017-11-18 15:41:11 · 2541 阅读 · 0 评论 -
python调用c++ ctype list传数组 或者 返回数组
pycallclass.cpp:#include using namespace std;typedef unsigned char BYTE;#define MAX_COUNT 20struct tagOutCardResult_py{ BYTE cbCardCount; BYTE cbResultCard1; BYTE cbR原创 2017-11-22 14:12:32 · 12086 阅读 · 1 评论