[pygtk] Application name is '-c'

Frédéric frederic.mantegazza at gbiloba.org
Tue Oct 14 21:26:43 WST 2008


Le 14/10/2008, "Walter Leibbrandt" <walter at translate.org.za> a écrit:

><code>
>$ cat papywizard.sh
>#/bin/sh
>
>python -c "from papywizard.scripts.main import main; main()" $@
></code>
>... and there's your "-c".

Yes.

>If you had replaced papywizard.sh with
>papywizard.py:
><code>
>#!/usr/bin/env python
>from papywizard.scripts.main import main
>main()
></code>
>... and `chmod +x papywizard.py`, you also would not have had that problem.
>
>If you still really want a shell script, you can call papywizard.py from
>there.

No, it won't work, at least in local, because I would have a
papywizard.py file which will mask the papywizard/ module. So the import
will fail. That's why I used a shell script. But it should work once
installed in /usr/local, I think...


--
   Frédéric


More information about the pygtk mailing list