[scribus] path question for a script to find itself

Bert Driehuis bertd.fpevohf.arg at taw.playbeing.com
Sat Oct 14 06:53:18 UTC 2017


Dear Martin,

You could try to reference the magic variable __file__, like this:

import os
here = os.path.dirname(__file__)
if not here:
    here = '.'
print here

Python is notoriously inconsistent in providing __file__ so YMMV.


With kind regards,

Bert Driehuis



More information about the scribus mailing list