Re: XML pickle

2008-02-18 Thread castironpi
> from lxml import etree > > class XMLable: >         cname= '' >         Text= object() >         class CTor: >                 def __init__( self, *ar ): >                         self.ar, self.kwar= ar, dict( ar ) >         ctor= CTor() >         FTor= dict >         ftor= {} >         def __ini

Re: XML pickle

2008-02-17 Thread castironpi
> > Which xmlns:ns1 gets "redefined" because I just didn't figure out how > > get xmlns:ns0 definition into the Workbook tag. But too bad for me. > > What about actually *reading* the links I post? > > http://codespeak.net/lxml/tutorial.html#the-e-factory > > Hint: look out for the "nsmap" keyword

Re: XML pickle

2008-02-15 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > On Feb 15, 11:10 am, [EMAIL PROTECTED] wrote: Can you use set( '{ss}Type' ) somehow? >>> What is 'ss' here? A prefix? >>> What about actually reading the tutorial? >>> http://codespeak.net/lxml/tutorial.html#namespaces And any way to make this look closer t

Re: XML pickle

2008-02-15 Thread castironpi
On Feb 15, 2:58 pm, [EMAIL PROTECTED] wrote: > > In Economics, they call it "Economy to Scale"- the effect, and the > > point, and past it, where the cost to produce N goods on a supply > > curve on which 0 goods costs 0 exceeds that on one on which 0 goods > > costs more than 0: the opposite of di

Re: XML pickle

2008-02-15 Thread castironpi
> In Economics, they call it "Economy to Scale"- the effect, and the > point, and past it, where the cost to produce N goods on a supply > curve on which 0 goods costs 0 exceeds that on one on which 0 goods > costs more than 0: the opposite of diminishing returns.  Does the > benefit of encapsulati

Re: XML pickle

2008-02-15 Thread castironpi
On Feb 15, 12:07 pm, [EMAIL PROTECTED] wrote: > On Feb 15, 11:10 am, [EMAIL PROTECTED] wrote: > > > > > Can you use set( '{ss}Type' ) somehow? > > > > What is 'ss' here? A prefix? > > > > What about actually reading the tutorial? > > > >http://codespeak.net/lxml/tutorial.html#namespaces > > > > > A

Re: XML pickle

2008-02-15 Thread castironpi
On Feb 15, 11:10 am, [EMAIL PROTECTED] wrote: > > > Can you use set( '{ss}Type' ) somehow? > > > What is 'ss' here? A prefix? > > > What about actually reading the tutorial? > > >http://codespeak.net/lxml/tutorial.html#namespaces > > > > And any way to make this look > > > closer to the original? >

Re: XML pickle

2008-02-15 Thread castironpi
> > Can you use set( '{ss}Type' ) somehow? > > What is 'ss' here? A prefix? > > What about actually reading the tutorial? > > http://codespeak.net/lxml/tutorial.html#namespaces > > > And any way to make this look > > closer to the original? > > What's the difference you experience? Target:

Re: XML pickle

2008-02-15 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: >> I cannot tell if the above approach will solve your problem or not. > > Well, declare me a persistent object. Ok, from now on, you are a persistent object. :) > from lxml import etree > > SS= '{urn:schemas-microsoft-com:office:spreadsheet}' > book= etree.Element( 'W

Re: XML pickle

2008-02-14 Thread castironpi
> I cannot tell if the above approach will solve your problem or not. Well, declare me a persistent object. from lxml import etree SS= '{urn:schemas-microsoft-com:office:spreadsheet}' book= etree.Element( 'Workbook' ) book.set( 'xmlns', 'urn:schemas-microsoft-com:office:spreadsheet' ) sheet= etr

Re: XML pickle

2008-02-14 Thread castironpi
Great! --  \          "I moved into an all-electric house. I forgot and left the |   `\   porch light on all day. When I got home the front door wouldn't | _o__)                                         open."  -- Steven Wright | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list

Re: XML pickle

2008-02-14 Thread Ben Finney
[EMAIL PROTECTED] writes: > Minimize redundancy. Please do so by trimming the quoted material; remove anything not relevant to people reading your reply. -- \ "I moved into an all-electric house. I forgot and left the | `\ porch light on all day. When I got home the front door wou

Re: XML pickle

2008-02-14 Thread castironpi
On Feb 14, 5:31 pm, [EMAIL PROTECTED] wrote: > On Feb 14, 1:49 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > > > > > Hi, > > > [EMAIL PROTECTED] wrote: > > > Stefan Behnel wrote: > > >> What I meant was: please state what you are trying to do. What you > > >> describe > > >> are the environme

Re: XML pickle

2008-02-14 Thread castironpi
On Feb 14, 1:49 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi, > > [EMAIL PROTECTED] wrote: > > Stefan Behnel wrote: > >> What I meant was: please state what you are trying to do. What you describe > >> are the environmental conditions and possible solutions that you are > >> thinking of, but i

Re: XML pickle

2008-02-14 Thread Stefan Behnel
Hi, [EMAIL PROTECTED] wrote: > Stefan Behnel wrote: >> What I meant was: please state what you are trying to do. What you describe >> are the environmental conditions and possible solutions that you are >> thinking of, but it doesn't tell me what problem you are actually trying >> to solve. http:

Re: XML pickle

2008-02-14 Thread castironpi
On Feb 14, 12:31 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Feb 14, 12:45 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> Readability of the Pickle module.  Can one export to XML, from cost of > >>> speed and size, to benefit of u

Re: XML pickle

2008-02-14 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > On Feb 14, 12:45 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> Readability of the Pickle module. Can one export to XML, from cost of >>> speed and size, to benefit of user-readability? >> Regarding pickling to XML, lxml.objectify can do tha

Re: XML pickle

2008-02-14 Thread castironpi
On Feb 14, 12:45 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi, > > [EMAIL PROTECTED] wrote: > > Readability of the Pickle module.  Can one export to XML, from cost of > > speed and size, to benefit of user-readability? > > Regarding pickling to XML, lxml.objectify can do that: > > http://codes

Re: XML pickle

2008-02-13 Thread Stefan Behnel
Hi, [EMAIL PROTECTED] wrote: > Readability of the Pickle module. Can one export to XML, from cost of > speed and size, to benefit of user-readability? Regarding pickling to XML, lxml.objectify can do that: http://codespeak.net/lxml/objectify.html however: > It does something else: plus functi

Re: XML pickle

2008-02-13 Thread George Sakkis
On Feb 13, 4:43 pm, [EMAIL PROTECTED] wrote: > Readability of the Pickle module. Can one export to XML, from cost > of speed and size, to benefit of user-readability? Take a look at gnosis.xml.pickle, it seems a good starting point. George -- http://mail.python.org/mailman/listinfo/python-list

Re: XML pickle

2008-02-13 Thread castironpi
On Feb 13, 10:41 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Feb 13, 4:43 pm, [EMAIL PROTECTED] wrote: > > > Readability of the Pickle module.  Can one export to XML, from cost > > of speed and size, to benefit of user-readability? > > Take a look at gnosis.xml.pickle, it seems a good startin