views:

97

answers:

2

Hi,

For great help from stackoverflow, the development for the Mac version of my program is done. Now I need to deploy my program, and I was wondering if there is any way to "hide" my running Python code (it also runs .so library and it seems it makes a dock item to appear).

The program is supposed to be running in the background and it would be great if I can hide any terminal or dock items. In Windows or linux, it was easy, but I am still not that used to Mac and could not figure out how to do this.

Thank you, Joon

A: 

have you tried using the nohup? lets say you have a launch script to start your program:

launch.sh:

nohup your_program & exit

kartheek
Thnaks! I will definitely check it out.
joon
+1  A: 

Are you using py2app and distributing a package? If so, you can set LSBackgroundOnly in info.plist.

right-click on your package
choose *Show Package Contents*
double click on info.plist in Contents to open the property list editor
Add Child "Application is background only"

(That makes the application invisible. If your application has a UI and you just want to hide the dock icon, use LSUIElement, which is "Application is agent" in the property list editor.)

Lee Reeves
I just finished coding the script so haven't had chance to make a package. py2app looks promising. I will check it out. Thank you so much!
joon
Anytime. Hope py2app works for you.
Lee Reeves
Oops .. py2app successfully generated the package but whenever I run it it crashes. (I can run Python code directly without any problem)
joon