Re: python plugins



Cut-paste snafu;
The code below is preceded by an:

import dia

On Sun, Oct 11, 2015 at 10:12 AM, Rustom Mody <rustompmody gmail com> wrote:
Writing python plugins for dia looks promising.. but I really cant get a start

From going through the archives I find this

$ cat .dia/python/helloworld.py

def hello_callback(data, flags):
   print "Hello, Dia!\n"
dia.register_callback("Hello",
                       "<Toolbox>/Help/Hello",
                       hello_callback)

With this, I see a Hello under Help

Remove the .../Help..." and it appears next to help in menu

However it seems to do nothing.



Ubuntu 15.4 dia 0.97.3



--


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