From: lkcl on
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
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
> 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