defines or C vars visible to python?
Tom Morton
tmorton at yikesstation.freeserve.co.uk
Sat Mar 4 09:11:26 EST 2000
More information about the Python-list mailing list
Sat Mar 4 09:11:26 EST 2000
- Previous message (by thread): Self Nanny
- Next message (by thread): defines or C vars visible to python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello. I'm writing a small colour ncurses module (in C) for a python project of mine. I've had no real trouble apart from one point: Various colours are defined in the module as: #define COL_RED 1 etc. Is there any way I can make these visible to python when the module is imported, so instead of using numbers I can do this: cursesmod.changecol(COL_RED) instead of: cursesmod.changecol(1) I've probaby missed something in the Python/C api docs but it's driving me insane! -- Tom Morton, Drangband Maintainer: http://www.yikesstation.freeserve.co.uk/drang/drang.htm Yikes Station, Frontier Elite 2 Fansite: http://www.yikesstation.freeserve.co.uk/frontier/yikes.htm
- Previous message (by thread): Self Nanny
- Next message (by thread): defines or C vars visible to python?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list