[Open-scap] Importing openscap library in Python

Ed ed.sealing at gmail.com
Fri Dec 11 20:47:14 UTC 2009


Thanks Peter. Just checked it out. Works like a charm. :-)

########  Few quick implementation questions ##########

I'm no swig genius, but I noticed I can't access many of the data types that
are represented in the C example (like oval_import_source). It looks like
these are hidden. (And accessed from the common 'oscap' functions??) Is that
correct?

I'm able to import an oval file with "oscap_import_source_new(file,
encoding)". Is this this intention, or should there be an
oval_import_source_new function as well?

If going through oscap_import_source object is correct, how would I get from
an "oscap_import_source" type to an "oval_import_source" type?

Thanks for all the hard work and help thus far!!

~Ed

On Fri, Dec 11, 2009 at 11:42 AM, Peter Vrabec <pvrabec at redhat.com> wrote:

> Hi Ed
>
> On Thursday 10 December 2009 10:34:09 pm Ed wrote:
> > Although the Python bindings are compiling correctly, when importing
> there
> > is an error of:
> >
> > "undefined: oval_object_probe"
> >
> > Currently there are 3 you need to ignore by adding the following lines
> > openscap.i (under ifdef WANT_OVAL):
> >
> > %ignore oval_object_probe;
> >
> > %ignore oval_definition_model_set_locked;
> >
> > %ignore oval_syschar_model_get_sysdata;
> >
> >
> > Then it seems to import. (I also use the "--enable-xccdf=no" when
> > configuring... since the api is still in development).
> hey this issue is fixed, check git repo
>
> > I like the example tests provided in C, has anyone done any oval
> > implementation examples in python?
> I'm planning to write some but I need to finish some testing first. :)
>
>
> > ~Ed
> >
> Peter.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/open-scap-list/attachments/20091211/ffefe8a8/attachment.htm>


More information about the Open-scap-list mailing list