Changed to embed python in the main process. This avoids getting zombie processes when the main app crashes.