On Tue, Sep 28, 2010 at 10:08 AM, Douglas Garstang <doug.garst...@gmail.com> wrote: > > On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini > <scarpell...@gmail.com> wrote: >> >> Douglas, >> I've started my tests with Python + Puppet Yaml yesterday, based on >> http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/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? It's not true and you're taking a particularly shitty attitude for someone who is asking for help Doug. Have you ever dumped Python objects to YAML and tried to read them from Ruby? I've just worked out how to solve your problem but haven't finished it. I have no desire to do so now. 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) http://pyyaml.org/wiki/PyYAMLDocumentation#Constructorsrepresentersresolvers -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.