/Mac/Tools/pythonw.c

http://unladen-swallow.googlecode.com/ · C · 17 lines · 8 code · 2 blank · 7 comment · 0 complexity · 4ba6461c4995041057f20f32177cff36 MD5 · raw file

  1. /*
  2. * This wrapper program executes a python executable hidden inside an
  3. * application bundle inside the Python framework. This is needed to run
  4. * GUI code: some GUI API's don't work unless the program is inside an
  5. * application bundle.
  6. */
  7. #include <unistd.h>
  8. #include <err.h>
  9. static char Python[] = PYTHONWEXECUTABLE;
  10. int main(int argc, char **argv) {
  11. argv[0] = Python;
  12. execv(Python, argv);
  13. err(1, "execv: %s", Python);
  14. /* NOTREACHED */
  15. }