Visio like library for Python?

Alexander Schmolck a.schmolck at gmx.net
Tue Apr 15 17:14:14 EDT 2003


skywalkerpackage at hotmail.com (Johannes Eble) writes:

> >A quick look at the Dia website seems to indicate that DiaPython exists.
> 
> Not really. There is a way to use Python plug-ins, but it is undocumented.
> It is impossible to write a plug-in without a knowlede of the c code. Also,
> I don't like GTK+ because this pseudo object oriented c style is very ugly
> IMHO let apart the problems you face with Windows.

You can just Right-mouse click on canvas,
Dialogs->Python Console. And tatah, you get a python console. dir() will then
Dialogs->reveal what's lying around:


>>> dir()
['__builtins__', '__doc__', '__history__', '__name__', 'dia']
>>> dia
<module 'dia' (built-in)>
>>> dir(dia)
['DiaArrow', 'DiaBezPoint', 'DiaColor', 'DiaConnectionPointType',
'DiaDiagramData', 'DiaDiagramType', 'DiaDisplayType', 'DiaError',
'DiaExportFilter', 'DiaFont', 'DiaHandleType', 'DiaImage', 'DiaLayerType',
'DiaObjectType', 'DiaObjectTypeType', 'DiaPoint', 'DiaProperties',
'DiaProperty', 'DiaRectangle', 'DiaText', '__doc__', '__name__',
'active_display', 'diagrams', 'get_object_type', 'load', 'register_callback',
'register_export', 'update_all']

etc. 

I have only looked at it for a minute (and succesfully zoomed my document :),
but I think it might be worth a little tinkering because even if the python
interface is undocumented and not completely up-to-scratch because dia itself
certainly seems to work rather well to me.

'as




More information about the Python-list mailing list