Hi Jeremy,
I used the workaround you suggested and it works fine.
Another little question: in the header of my data file I have some rows, useful for plotting and manipulating data, stored in the form: SampleFrequency = xxxyyyHy I'd like to use them in order to crate Vuesz constants. Is there a way to create constants programmatically in an importPlugin?

Thank you very much,
Valerio.

On 04/09/2011 13:32, Jeremy Sanders wrote:
mimisa...@gmail.com wrote:

Hi all!
First of all, thank you very much for VUESZ, it is really simple and
effective. Since I discovered it I'm using it everyday.

I'm trying to write an importPlugin to read the log files of a process
control system I use at work. The problem is that the first column of data
is a time-stamp in iso data format (YYYY-MM-DDThh:mm:ss.ss), but in the
"Import plugins" page I cannot find a class able to import DateTime
datasets (ImportDatasetDateTime ???).
I've missed out date time datasets for import and dataset plugins. It won't
be hard to fix this and they should be there.

As a workaround, you can convert your datetime objects to veusz floating
point times using

import veusz.utils as utils

utils.datetimetoFloat ->  convert python datetime to float
utils.dateStringToDate ->  convert string containing iso or local dates to
floats

Then you can create a simple 1D dataset from these values. They won't show
up correctly in the data edit dialog boxes, but they will plot.

This isn't a standard api, however, and might be subject to change.

Jeremy



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


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

Répondre à