py2exe service and tool-tray app combined?

Brad Clements bkc at Murkworks.com
Mon Aug 18 14:06:28 EDT 2003


(moved from ctypes list)

I've taken a look at the py2exe source. What I'd like to do is combine the
functionality of run_svc.c with that of run_w.c

So for example, could I simply change run_svc.c

int main (int argc, char **argv)
{
    int result;
    result = init();
    if (result)
 return result;

    if(1 < argc && !stricmp(argv[1], "-x"))
      return start(argc, argv)
   else
     return PythonService_main(argc, argv);
}


Then link in start.c in addition to PythonService.cpp ?

This way, the generated exe could work as both a service, and a regular
application just by passing -x as the first command line option, or some
other well-defined sentinel.

I don't have the win32 source, so it's not easy for me to try. Anyone know
off-hand if start.c exports items that will collide with PythonService.cpp?









More information about the Python-list mailing list