schnumbl _ wrote:
I would like to understand how I can write plugins for Veusz. Could you
give an example how I can translate a command from a veusz-file, e.g.
Add('page', name='mypage', autoadd=False)
There's some documentation here http://barmag.net/veusz-wiki/ToolsPlugins .
It doesn't say explicitly, but the interface object allows you to access
Veusz commands, e.g.
interface.Add('page', name='mypage', autoadd=False)
There is a more object-oriented interface for manipulating the document,
described here http://barmag.net/veusz-wiki/EmbeddingPython where you can
navigate around the nodes in the document tree.
You can do this instead
page = interface.Root.Add('page')
page.Add('graph')
...
(this can be combined with the standard API)
I downloaded the source code of veusz and tried to start it
with eclipse and PyDev. If I start veusz_main.py I get error messages
because some modules cannot be found.
...
Could you give a step by step instruction how I should install / unzip
the source code, the sip file
(http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.13.zip ?)
and so on to be able to run Veusz from source? Or do you know some good
Python tutorial I can start with?
It's a bit unclear what type of system you are running with - is this
Windows, Linux or Mac OS X? Whichever system, you don't need to install from
source to write plugins, but you can use the binary instead.
If you want to use the source, on linux you can use a package manager to
download the dependencies. On Windows and Mac OS it is more difficult
You can install Python from a binary, and install the numpy modules from a
binary too.
You can get the Qt binary distribution from the nokia website, then build
SIP - instructions here
http://www.riverbankcomputing.co.uk/static/Docs/sip4/index.html - then get
PyQt - http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/index.html
Jeremy
___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss