Re: [Veusz-discuss] (no subject)

2011-11-08 Par sujet Jeremy Sanders
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


Re: [Veusz-discuss] (no subject)

2011-11-08 Par sujet Benjamin K. Stuhl
On Tue, November 8, 2011 02:49, Jeremy Sanders wrote:
 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

Alternatively, on Windows you can install python(x,y) 
(http://code.google.com/p/pythonxy/),
which includes PyQt, numpy, (and a lot more), and optionally a compiler so you 
can build more
python extensions.

Regards,
-- BKS

___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


[Veusz-discuss] (no subject)

2011-11-07 Par sujet schnumbl _

Hi together,

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)

to a python command that can be used in a tool plugin? I could not find
further documentation about a veusz api. Maybe the best way is to
have a look at the source code of Veusz? 

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. 

The README file says that there are some requirements:

 Qt = 4.3 (free edition)
   http://www.trolltech.com/products/qt/  
 PyQt = 4.3 (SIP is required to be installed first)
   http://www.riverbankcomputing.co.uk/pyqt/
   http://www.riverbankcomputing.co.uk/sip/
 numpy = 1.0
   http://numpy.scipy.org/

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?

Best regards,

Stefan___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss