易截截图软件、单文件、免安装、纯绿色、仅160KB

python31与C交互

1.c调用python:
   实例代码:
main.c调用test.py的
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//main.c
#include <windows.h>
#include <python.h>
#include <stdio.h>
#include <stdlib.h>
int main(){
     Py_Initialize() ;//initialize the python system
    PyObject * py= PyImport_ImportModule("test");
    Py_Finalize();//Finalize  the python system
}
    
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


相关文档:

GNU/Linux平台的C程序开发及程序运行环境

本文介绍在GNU/Linux环境下一个C程序由源代码到程序,到加载运行,最后终止的过程。同时以此过程为载体,介绍GNU/Linux平台下软件开发工具的使用。
 
本文以我们最常见的hello, world!为例:
 
#include <stdio.h>
main ()
{
      printf(“hello, world!\n” ......

高质量C++/C编程指南

http://man.lupaworld.com/content/develop/c&c++/c/c.htm
1. 如果参数是指针,且仅作输入用,则应在类型前加const,以防止该指针在函数体内被意外修改
2. 在函数体的“入口处”,对参数的有效性进行检查
    在函数体的“出口处”,对return语句的正确性和效率进行检 ......

C陷阱:判断宏是否等于一个常数

下面这段代码有啥错误?
#if ULONG_MAX == 0xFFFFFFFF
inline unsigned long byte_swap(unsigned long x) { return __builtin_bswap32(x); }
inline long byte_swap(long x) { return __builtin_bswap32(x); }
#else
inline unsigned long byte_swap(unsigned long x) { return __builtin_bswap64(x); }
inline long ......

python 集合运算

集合类型操作符(所有的集合类型)
联合( | )
联合(union)操作和集合的OR(又称可兼析取(inclusive
disjunction))其实是等价的,两个集
合的联合是一个新集合,该集合中的每个元素都至少是其中一个集合的成员,即,属于两个集合其

之一的成员。联合符号有一个等价的方法,union().
Edit By Vheavens
Edit By Vhe ......

使用pdb进行python的调试

1 在想要插入断点的地方插入代码
                import pdb
                pdb.set_trace()
2然后使用指令进行debug
查看代码上下文,l(小写L)
监视变量 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号