From: lkcl on 1 Jul 2010 16:22 hi, i need to convert an application (fontforge) to a python library. yes, libfontforge is already done as is libgdraw (fontforge-pygtk) but i need to make fontforge the _application_ a python application, using the same ctypes trick that's already done. my question is, therefore, how do i specify a ctypes wrapper around the standard int main(int argc, char *argv[]) which i am (obviously) going to move to a (new) c library? many thanks, l.
From: Stefan Behnel on 1 Jul 2010 17:13 lkcl, 01.07.2010 22:22: > i need to convert an application (fontforge) to a python library. > yes, libfontforge is already done as is libgdraw (fontforge-pygtk) but > i need to make fontforge the _application_ a python application, using > the same ctypes trick that's already done. > > my question is, therefore, how do i specify a ctypes wrapper around > the standard int main(int argc, char *argv[]) which i am (obviously) > going to move to a (new) c library? Why don't you just start the program as an external subprocess? Stefan
From: Christian Heimes on 1 Jul 2010 18:05 > my question is, therefore, how do i specify a ctypes wrapper around > the standard int main(int argc, char *argv[]) which i am (obviously) > going to move to a (new) c library? Maybe I missing something here but libraries don't have a main() function. The main() function is the entry point of a program. Libraries have different means for initialization. Christian
|
Pages: 1 Prev: Anyone using GPG or PGP encryption/signatures in your Python apps? Next: Packaging question |