On  23-Mar-2007, at 22:27 , Alfred Morgan wrote:
#!/bin/sh
cat > /tmp/alfred_hw.py << .
from Tkinter import Tk, Label
r=Tk()
Label(r, text="Hello World").pack()
r.mainloop()
.
mkdir ~/Desktop/alfred_hw.app
cat  > ~/Desktop/alfred_hw.app/alfred_hw << .
#!/usr/bin/env pythonw /tmp/alfred_hw.py
.
chmod +x ~/Desktop/alfred_hw.app/alfred_hw

Yes, this one works for me just fine!!

I'm very surprised, because it does not follow any Apple guideline for application bundles that I've ever seen. (Also, I don't know what I did differently yesterday when it didn't work for me, but never mind that). BTW: you can make things even simpler by putting the Python code into alfred_hw. And moreover you don't need pythonw, apparently because you're in an App bundle already:

#!/bin/sh
mkdir ~/Desktop/alfred_hw.app
cat  > ~/Desktop/alfred_hw.app/alfred_hw << .
#!/usr/bin/env python
from Tkinter import Tk, Label
r=Tk()
Label(r, text="Hello World").pack()
r.mainloop()
.
chmod +x ~/Desktop/alfred_hw.app/alfred_hw


Is anyone else familiar with such simple .app bundles?
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to