Quote:
Originally Posted by kovidgoyal
Code:
from calibre.ptempfile import TemporaryDirectory
with TemporaryDirectory('xxx') as tdir:
for x in ('one.jpg', 'two.jpg'):
with open(os.path.join(tdir, x) as f:
f.write(get_resources('images/' + x))
about.exec_()
|
Thanks, make that:
Code:
with open(os.path.join(tdir, x),'w') as f:
A minor, probably trivial question: How can I access the "version" defined in __init__ (or "name", or "author"...) from elsewhere inside the plugin code?