[Zim-wiki] writing plugins

2011-02-10 Thread Alessandro Magni
hi people, it is a bit of time since I'm thinking about trying to write some simple plugin - to start with, I wanted to try with an , since I prefer GNUplot in place of R. I read in the manual to check the HACKING directory, and I tried to follow the code in gnu_r_ploteditor.py to take it as ex

Re: [Zim-wiki] writing plugins

2011-02-10 Thread smu
Hi alessandro, you could post the code of your plugin, then it would be easier to identify your bug. It sound as if a File object is expected somewhere but None is returned and the basename function fails. Does the preview function display your plot correctly? I get the same exception (with the g

Re: [Zim-wiki] writing plugins

2011-02-10 Thread Alessandro Magni
On 02/10/2011 10:07 AM, s...@z107.de wrote: Hi alessandro, you could post the code of your plugin, then it would be easier to identify your bug. It sound as if a File object is expected somewhere but None is returned and the basename function fails. Does the preview function display your plot

Re: [Zim-wiki] writing plugins

2011-02-10 Thread smu
Hi alessandro, (sorry for the PM, last mail should go to the mailinglist) your code seems to be ok. But you need a template to the gnuplot code in data/templates/_gnuplot.gnu. I attached a template[1] that should work. best regards, stefan [1] I do not know gnuplot, maybe there are better co

Re: [Zim-wiki] writing plugins

2011-02-10 Thread smu
and the attachment :/ set term png set output '[% png_fname %]' [% gnuplot_script %] ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.l

Re: [Zim-wiki] writing plugins

2011-02-10 Thread Alessandro Magni
hi Stefan, thank you for your help - I had already a _gnuplot.gnu in /usr/share/zim/templates, I just forgot to tell you! I tried substituting it with yours, but no hope: the error remains the same. Checked permissions also, and they're ok... alessandro On 02/10/2011 02:06 PM, s...@z107.de w

Re: [Zim-wiki] writing plugins

2011-02-10 Thread Jaap Karssenberg
On Thu, Feb 10, 2011 at 9:13 AM, Alessandro Magni wrote: > But any code I use inside it returns a "Looks like you found a bug" window, > telling me "AttributeError: 'NoneType' object has no attribute 'basename' " What you want to do is run zim with "zim -D" from a terminal, when the error happens

Re: [Zim-wiki] writing plugins

2011-02-10 Thread Alessandro Magni
Jaap, Stefan, thank you for your help. Running zim with "-D" (which I knew, but I forgotten about!) did the trick... funny, it wasnt a python error but a stupid gnuplot error - I inserted as a test "exp(x)" instead of a "plot exp(x)": zim -D showed the error immediately. Well, the plugin works

Re: [Zim-wiki] writing plugins

2011-02-10 Thread Jaap Karssenberg
On Thu, Feb 10, 2011 at 4:18 PM, Alessandro Magni wrote: > Well, the plugin works - if anybody is interested! If you want it included as a standard plugin you can open a ticket in the bug tracker and attach your code. -- Jaap ___ Mailing list: https:/