tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Borley" <ajbor...@gmail.com>
Subject Re: SDO in a Python component?
Date Mon, 27 Nov 2006 21:31:58 GMT
On 11/27/06, Jean-Sebastien Delfino <jsdelfino@apache.org> wrote:
> Andrew Borley wrote:
> > OK, with no dissenting voices, I've put in this fix at r476094. SDOs
> > now get converted to Python xml.etree.ElementTree.Element objects when
> > used as parameters or properties to Python components (and the
> > conversion goes in the opposite direction when a Python component
> > returns an Element).
> >
> > Cheers
> >
> > Andy
> >
> >
> > On 11/15/06, Andrew Borley <ajborley@gmail.com> wrote:
> >> I've started to fix this hole in the SCA C++ Python support.
> >>
> >> Looking at the various options, ElementTree seems the simplest, most
> >> "Pythonic" XML library to use - this is included in Python 2.5, but I
> >> don't think it is in earlier versions so we'll need to up our required
> >> Python level to 2.5 or provide the details of how to add ElementTree
> >> support (which is very simple - the library is written in Python and
> >> claims to be runnable on 1.5.2 and later).
> >>
> >> In the future it may be good to have something more SDO-ish - what do
> >> people think?
> >>
> >> Cheers
> >> Andy
> >>
> >> On 10/2/06, Jean-Sebastien Delfino <jsdelfino@apache.org> wrote:
> >> > [snip]
> >> > > On 9/22/06, Jean-Sebastien Delfino <jsdelfino@apache.org> wrote:
> >> > >> To allow Python components to handle more than just simple data
> >> types,
> >> > >> we need to decide how we present structured data / complex types
to
> >> > >> Python components. We'll probably want to support many more data
> >> binding
> >> > >> options in the future, but we need one simple solution as a
> >> starting
> >> > >> point.
> >> > >>
> >> > >> For Ruby I have implemented support for Rexml for now mainly
> >> because
> >> > >> it's included in the Ruby distribution. What do you guys think
> >> we should
> >> > >> use for Python?
> >> > >> - an xml.dom or xml.minidom - from the Python standard library
> >> > >> - an xml.ElementTree - more pythonic and nicer rendering, recent
> >> > >> addition to the Python 2.5 standard library (just released on
Sept
> >> > >> 19th), available as a separate package on older releases
> >> > >> - a new implementation of a Python transcription of the SDO API?
> >> > >>
> >> > >> Here's what I was thinking about:
> >> > >> - step 1, soon - ElementTree
> >> > >> - step 2, longer term - an SDO API
> >> > >>
> >> > >> Any thoughts?
> >> > >>
> >> > >> --
> >> > >> Jean-Sebastien
> >> > >>
> >> > Andrew Borley wrote:
> >> > [snip]
> >> > > Yep, I was thinking about this too - I think you're right that we
> >> need
> >> > > something soon (and basing it on an XML technology that's already
> >> > > available is the right way to do this) and then an SDO API later
> >> > > (probably wrappering the C++ implementation, in a similar way to the
> >> > > PHP SDO package).
> >> > >
> >> > >
> >> >
> >> > We're going to need something if we want to include the support for
> >> > Python in our M2 release. I was rereading this thread and I'm not sure
> >> > that we've clearly identified how we're going to present structured
> >> data
> >> > to Python scripts (coming from a Web Service for example).
> >> >
> >> > Any more thoughts? Do people prefer:
> >> > - ElementTree?
> >> > - A flavor of DOM?
> >> > - the SDO API wrapped in SWIG?
> >> > - a more Pythonic rendering of the SDO API?
> >> >
> >> > Any Python developers out there would like to jump in and tell us
> >> their
> >> > preference?
> >> >
> >> > --
> >> > Jean-Sebastien
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >> >
> >> >
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
> Andy,
>
> I'm putting together a new REST sample illustrating how to
> Create/Retrieve/Update/Delete resources using a REST binding, and I'm
> writing this sample in Python (to help show your Python extension as
> well). Do you have any code snippets showing how to use Python
> ElementTrees in a component that I could reuse?
>

Hi Sebastien,

I'm just tidying up a sample that demonstrates using ElementTrees
returned from a web service - found & fixed a couple of bugs on the
way that I need to check in too - will hopefully get this up tonight.

Cheers
Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Mime
View raw message