0

I am trying to make an executable python program on MAC OSX. I used the build applet program and it runs, but I had some data printing in the shell window and the executable file does not open a window. Is there a way to open a shell window with an executable python program?

Thanks

English Grad
  • 1,365
  • 5
  • 21
  • 40
  • when you say "compiled" and "applet" are you referring to using Automator to make an app around your python script? – jdi Jan 30 '12 at 21:40

2 Answers2

1

Not sure about generating another shell window, but do you need to have an entire shell open? What about getting the information to the user in a different way, such as:

  • use another Toplevel window and insert the output into a Text or Listbox, rather than simply printing it. This could also make it easier for users to copy the output (if that's something they might find useful).

  • write out a data/log file.

0

If you are using Automator to simply run your python script, and you really need it to open a shell window, here is a cheap hack:

Using a simple application with Run Shell Script action:

open -a Terminal /path/to/python/script.py

But if all your application is doing is printing output, all that output would be visible in the Console.app.

jdi
  • 90,542
  • 19
  • 167
  • 203