On Tue, Sep 28, 2010 at 10:13 AM, Nigel Kersten <[email protected]>wrote:

> On Tue, Sep 28, 2010 at 10:08 AM, Douglas Garstang
> <[email protected]> wrote:
> >
> > On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini
> > <[email protected]> wrote:
> >>
> >> Douglas,
> >> I've started my tests with Python + Puppet Yaml yesterday, based on
> >>
> http://www.mailinglistarchive.com/html/[email protected]/2010-05/msg00539.html
> ,
> >> and I'm having the same difficulties.
> >> I shall keep working on this script today and I'll post the solution, if
> I
> >> can find it.
> >>
> >>
> >
> > Eduardo,
> > That's about the only document I found on the subject too. I don't know
> why
> > the report document has to be so complicated. The !ruby tags are
> completely
> > unnecessary. I'm not about to go and learn ruby, as I dislike it
> immensely.
> > I guess it might be possible to pre-process the re
>
> Upon what basis are you saying that the Ruby tags are completely
> unnecessary?
>
>
On the basis that they don't actually contain any useful data.


> It's not true and you're taking a particularly shitty attitude for
> someone who is asking for help Doug.
>
>
It is true, and you're taking a particularly sensitive attitude for someone
that doesn't know me Nigel.



> Have you ever dumped Python objects to YAML and tried to read them from
> Ruby?
>
>
No, I don't like Ruby.



>
> I've just worked out how to solve your problem but haven't finished it.
>
> I have no desire to do so now.
>
>
> Good grief.


> Here is what I've worked out so far. If you have issues, go read the
> pyYAML documentation and YAML spec like I just did.
>
>
> def sym_representer(dumper, data):
>  return dumper.represent_scalar(u'!ruby/sym', u'%sd%s' % data)
>
> def sym_constructor(loader, node):
>  value = loader.construct_scalar(node)
>  return "foo" # you're going to have to work out how to make your
> constructor work.
>
> yaml.add_constructor(u'!ruby/sym', sym_constructor)
>
>
>
I already read it, but didn't understand it within the context of the
problem I was trying to solve.

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to