python plugins



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]