Re: Re: dia python plugin, how to store temporary information during export



at Fri, 27 Mar 2009 12:01:21 +0100, Hans Breuer wrote:

Hi,
is there some way to store information in the dia objects during export
with a python plugin?
Depends on what version of Dia you are using. With 0.97-pre there is
generic object metainfo. Just use:
      obj.properties["meta"] = {'mykey' : 'myvalue' }
which then gets stored and loaded with Dia's standard load/save.
Thanks. I'll try that. I had 0.96.1. So today I fetched 0.97... from svn.
        
Is this generate from PyDia? Maybe you can show some source?
(Given the recent increase in PyDia questions I wonder why there are
no user provide PyDia plug-ins. Are you all just developing
proprietary stuff?)
No, it's not proprietary. And I plan to submit a patch quite soon. The current (alpha!!!) version (not 
cleaned up, still using a dictionary instead of metainfo) is appended.

Sebastian

Attachment: state_gen_preview.py
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]