On 07/10/12 09:24, Abraham Schneider wrote:
> [posted to rush.general]
>
> Wouldn't YAML (http://www.yaml.org/) be the perfect solution for this =
> kind of ASCII files,
Yes, a good solution that does seem to use a similar data format
(padded key/value pairs), and perhaps better for Kevin's case
if he needs the features it offers.
Why offer my own code? It's only 100 lines, so it can be easily
pasted into a script, or added to an existing lib. I like small code ;)
yaml does what it does in 5800 lines python code and is a full
library install. Not as easy, and a bit more code to load up
in order to use it.
Yaml serves a much larger, more generalized purpose, and
includes features I generally don't need for just saving
simple one dimensional data.
But if I needed a full data saving/loading solution,
yaml does look like a great way to go; their data format
is similar to mine.. might even be 100% compatible, not sure.
> ..instead of having your own propietary format and parser?
Is the code I posted any more "proprietary" than yaml? ;)
Whether it comes from seriss.com or yaml.org, if it does
the job, it shouldn't matter.
The reason I have my own code for this is it's actually part of
a larger rush python library that will be included in the next
release, the code being 100% compatible with the data the older
rush perl scripts generate.
In general I don't like Rush to depend on external libraries,
as it makes installs for the customer harder, and sometimes
global needs force such libs to track modern technology that causes
new code not to run on slightly older machines.
I've always tried to make the rush scripts operate correctly
on even the oldest script interpreters that come with the OS's,
just to avoid the support issues that come with such problems.
I hate forcing people to upgrade entire machines just because
the latest release of a lib won't run on yesterday's equipment..
--
Greg Ercolano, erco@(email surpressed)
Seriss Corporation
Rush Render Queue, http://seriss.com/rush/
Tel: (Tel# suppressed)ext.23
Fax: (Tel# suppressed)
Cel: (Tel# suppressed)
|