Define a constant in Python C extension

2009-02-27 Thread fredbasset1000
I'm writing a C extension for Python, is it possible to define constants in the C code and have them visible from Python? -- http://mail.python.org/mailman/listinfo/python-list

problem with import path on a python C extension

2009-02-09 Thread fredbasset1000
Hi All, I've written a simple Python extension module in C, but Python is having problems trying to locate it when I import it into an existing Python file. In my example, I wrote a C extension called "diomodule" which exists in the directory : /root/project/drivers/dio/ diomodule.c. It has comp

Where & how to deallocate resources in Python C extension

2009-02-02 Thread fredbasset1000
Hi, I've written a C extension, see code below, to provide a Python interface to a hardware watchdog timer. As part of the initialization it makes some calls to mmap, I am wondering should I be making balanced calls to munmap in some kind of de-init function? Do Python extensions have d'tors? T

unittest, how to recursively run tests?

2008-05-19 Thread fredbasset1000
Hi All, Does anyone know of a good way to execute all unit tests present in a project from the project root dir? Ideally I'd like a mechanism that does not require the tests/files to be manually listed in the source (e.g. via the suite mechanism). Thanks all, Fred -- http://mail.python.org/mailma