Am 23.01.17 um 04:09 schrieb Kevin Walzer:
> On 1/22/17 6:13 PM, Pascal Oberndörfer wrote:
>> I have been using Build Applet quite extensively in the past. I now
>> wanted to use them with 2.7.13, but if I actually build the Applet --

...

> Is there any reason you can't move to a more modern bundling
> tool like py2app, which is actively developed and certainly is more
> robust than Build Applet? (I say this as one who used Build Applet back
> in the day, but it's probably been 10 years).


Installed py2app right away, like the alias mode very much, but
unfortunately I am probably doing something wrong when trying to catch
the names of files dropped onto a very basic script/bundle form argv.

In setup.py, argv_emulation is True, and the script (below) is just
trying to log all args in argv to a log file on the Desktop.

It works if I use 'open dist/logging2.app --args one two three'. But if
i drop one or more files on the bundle, argv[1:] remains empty.

What am I missing? Again, thank you!

Pascal

***


#!/usr/local/bin/python
# -*- coding: utf-8 -*-

import logging
import os
import sys

log_path = os.path.join(os.path.expanduser('~'), 'Desktop', 'test.log')

logging.basicConfig(
    level=logging.DEBUG,
    format='%(asctime)s %(levelname)-8s %(message)s',
    filename=log_path,
    filemode='w' # or e.g. 'a' to append
)


for arg in sys.argv[:]:
    logging.info(arg)




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

Reply via email to