Dan wrote:
> I'm using python's xml.dom.minidom module to generate xml files, and
> I'm running into memory problems.
Then take a look at cElementTree. It's part of Python 2.5 and is available as
a separate module for Python 2.4. It's fast, has a very low memory profile and
if you ever decide to n
John Machin wrote:
> One can even use ElementTree, if the HTML is well-formed. See below.
> However if it is as ill-formed as the sample (4th "td" element not
> closed; I've omitted it below), then the OP would be better off
> sticking with Beautiful Soup :-)
Or (as we were talking about the best
Tim Arnold wrote:
> Hi, I'm using the TidyHTMLTreeBuilder to generate some elementtrees from
> html. One by-product is that I'm losing comments embedded in the html.
That's how the parser in ET works. Use lxml instead, which keeps documents
intact while parsing.
http://codespeak.net/lxml/dev/
ht
Wildemar Wildenburger wrote:
> sharan wrote:
>> I've been experimenting with the jclark's expat parser. I compiled it
>> on
>> linux, and it works just great. However, finding tags and data by
>> implementing the callback functions in c language is cumbersome.
>> Has anybody written code that use
Paul McGuire wrote:
> On Nov 17, 9:37 am, Wade Leftwich <[EMAIL PROTECTED]> wrote:
>> I'm about halfway through Charles Stross' excellent new novel,
>> "Halting State". It's set in Edinburgh in the year 2018, and one of
>> the main characters is a game programmer whose primary language is
>> someth
[EMAIL PROTECTED] wrote:
> what's the equivalent of minidom's getElementsByTagName in ElementTree?
element.findall("//{namespace}tagname")
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Just Another Victim of the Ambient Morality wrote:
> I've done a google search on this but, amazingly, I'm the first guy to
> ever need this!
You cannot infer that from a Google search.
> So, how do I convert HTML to plaintext? Something like this:
>
> This is a string.
>
> ...in
[EMAIL PROTECTED] wrote:
> On 24 Nov, 05:42, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]> wrote:
>
>> I did find some people who complained about this and rolled their own
>> solution but I refuse to believe that Python doesn't have a built-in
>> solution to what must be a v
Shane Geiger wrote:
> James Matthews wrote:
>> I am looking for a library that will create Rss/Atom feeds in python.
>> It needs to format the XML in a readable format! Does anyone have any
>> suggestions?
http://trac.openplans.org/openplans/browser/TaggerClient/trunk/taggerclient/atom.py?rev=6717
Wang, Harry wrote:
> Test Suite Started @ 2007-11-26 11:34:46.617000
> Traceback (most recent call last):
> File "C:\UDR2\UDRxmlGateway.py", line 370, in
> ParseAll()
> File "C:\UDR2\UDRxmlGateway.py", line 286, in ParseAll
> py_obj = gnosis.xml.objectify.XML_Objectify(InputFile).make_
Ramdas wrote:
> I am doing some HTML scrapping for a side project.
>
> I need a method using sgmllib or HTMLParser to parse an HTML file and
> get line nos of all the tags
Try lxml.html, it provides line numbers for each element.
http://codespeak.net/lxml/dev/
Stefan
--
http://mail.python.org/
José Rui Faustino de Sousa wrote:
> I am writing a text to XML parser that as to be easily extensible (via
> new text format plug-ins) and modifiable if the XML format used changes.
>
> Since the text order does not match the XML document order I have to use
> a package that allows DOM-like han
abhishek wrote:
> sh: a2ps: not found
This should make you think. Sounds like a good reason to install a2ps...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Christof Hoeke wrote:
> I was wondering if there is any way to use XSLT2 or maybe even XQuery
> with "normal" CPython. Using Saxon/XSLT2 with Jython is no problem (I
> have not tried Saxon.NET with IronPython but suspect no problem?) but I
> could not find any way to use XSLT2 or XPath Features wit
veracon wrote:
> I'm looking to use XML and XSLT for templates in a system I'm writing,
> however I'm not really sure which parser is the "best". Basically,
> which library has the most features, and which is the most supported?
lxml arguably has the most features by now, as it is based on libxml2
Sullivan WxPyQtKinter wrote:
> My search needs:
> 1. Search and return all the record (an element) with specific id.
> 2. Search and return all the record whose child nodes has a specific id
> or attribute.
Try lxml, which is based on the libxml2 library. The current SVN version has
support for xm
George Sakkis wrote:
> Fredrik Lundh wrote:
>
>> [EMAIL PROTECTED] wrote:
>>
>>> I wanted to see what would happen if one used the results of a tostring
>>> method as input into the XML method. What I observed is this:
>>> a) beforeCtag.text is of type
>>> b) beforeCtag.text when printed display
Zero Piraeus wrote:
> I want to remove an unused namespace declaration from the root element
> of an ElementTree in lxml.
>
> There doesn't seem to be any documented way to do this, so at the
> moment I'm reduced to sticking the output through str.replace() ...
> which is somewhat inelegant.
And
Robert Kern wrote:
> The problem is that for SQL databases, there is a substantial API that they
> can
> all share. The implementations are primarily differentiated by other factors
> like speed, in-memory or on-disk, embedded or server, the flavor of SQL, etc.
> and only secondarily differentiate
Christian Heimes wrote:
> Stefan Behnel wrote:
> > Well, there is one parallel processing API that already *is* part of
> stdlib:
>> the threading module. So the processing module would fit just nicely into the
>> idea of a "standard" library.
>
> Do
Zero Piraeus wrote:
>> You can try this:
>>
>>root = etree.parse(...).getroot()
>>new_root = etree.Element(root.tag, root.attrib)
>>new_root[:] = root[:]
>>
>> Note, however, that this will not copy root-level PIs or internal DTD
>> subsets.
>> But you can copy PIs and comments by hand
Peter Pei wrote:
> One bad design about elementtree is that it has different ways parsing a
> string and a file, even worse they return different objects:
> 1) When you parse a file, you can simply call parse, which returns a
> elementtree, on which you can then apply xpath;
ElementTree doesn't su
Peter Pei wrote:
> To be preise
[...]
Preise the lord, not me. :)
Happy New Year!
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
paul wrote:
>> Can i create python classes based off the XSD files? What else can I
>> do with the XSD files?
> This might be worth looking at: http://www.rexx.com/~dkuhlman/#generateDS
If it's really such a complex XML language, the tool above might or might not
be of any help, as it doesn't sup
Hi,
Chris Mellon wrote:
> On that note, I really don't like APIs that take either a file name or
> a file object - I can open my own files, thanks.
... and HTTP URLs, and FTP URLs. In lxml, there is a performance difference
between passing an open file (which is read in Python space using the rea
Fredrik Lundh wrote:
> Stefan Behnel wrote:
>
>>> My take on the API decision in question was always that a file is
>>> inherently an XML *document*, while a string is inherently an XML
>>> *fragment*.
>>
>> Not inherently, no. I know some people
Brad wrote:
> I was just looking through the 2.5.1 source code. I noticed a few
> mis-spellings in the comments. No big deal really. Can patches be
> submitted that correct the spelling errors or should they just be
> pointed out to some mailing list?
Funny you ask, if there were so few, you could
Henry Chang wrote:
> On Jan 7, 2008 5:41 AM, alain <[EMAIL PROTECTED]> wrote:
>> Paraphrasing Steve Jobs but in this context:
>> PYTHON = a bycycle for the mind
> What exactly does it mean "a bycycle for the mind"??
Ask the Dutch guy near you.
Stefan
--
http://mail.python.org/mailman/listinfo/py
grflanagan wrote:
> On Jan 15, 9:33 pm, Gowri <[EMAIL PROTECTED]> wrote:
>> I've been reading about ElementTreee and ElementPath so I could use
>> them to find the right elements in the DOM. Unfortunately neither of
>> these seem to offer XPath like capabilities where I can find elements
>> based o
John Machin wrote:
> On Jan 19, 11:00 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>> John Machin wrote:
>>> I'm happy enough with reassembling the second item. The problem is in
>>> reliably and correctly collapsing the whitespace in each of the above
>> > fiveelements. The standard Python idiom
Hi,
Paul Boddie wrote:
> People will, of course, tell you that you shouldn't use a DOM for
> anything and that the "consensus" is to use ElementTree or lxml (see
> above), but I can't help feeling that this has a damaging effect on
> the XML situation for Python: some newcomers would actually bene
Hi,
Mike Driscoll wrote:
> I got lxml to create a tree by doing the following:
>
> from lxml import etree
> from StringIO import StringIO
>
> parser = etree.HTMLParser()
> tree = etree.parse(filename, parser)
> xml_string = etree.tostring(tree)
> context = etree.iterparse(StringIO(xml_string))
Tim Arnold wrote:
> I'm unable to get xmlproc to validate my docbook test file. This is new
> territory for me, so I'd appreciate any advice on what I'm doing wrong.
> Using python 2.4 on HPux10.20.
I do not have much experience with xmlproc, but I'd encourage you to use lxml,
which uses the pars
Hi,
Paul Boddie wrote:
> I'm not disputing the benefits of the ElementTree approach, but one
> has to recall that the DOM is probably the most widely used XML API
> out there (being the one most client-side developers are using) and
> together with the other standards (XPath and so on) isn't as ba
Hi,
kliu wrote:
> what I really need is the mapping between each DOM nodes and
> the corresponding original source segment.
I don't think that will be easy to achieve. You could get away with a parser
that provides access to the position of an element in the source, and then map
changes back into
[EMAIL PROTECTED] wrote:
> What to one do if one what to use lxml(http://codespeak.net/lxml/
> index.html) on a mac?
Have you tried installing up-to-date versions of libxml2/libxslt and running
easy_install lxml
?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> On Jan 23, 4:19 pm, Stefan Behnel wrote:
>> [EMAIL PROTECTED] wrote:
>>> What to one do if one what to use lxml(http://codespeak.net/lxml/
>>> index.html) on a mac?
>> Have you tried installing up-to-date versions of libxml2/libxslt and r
Mike Driscoll wrote:
> Both the normal parser example and the objectify example you gave me
> give a traceback as follows:
>
> Traceback (most recent call last):
> File "\\clippy\xml_parser2.py", line 70, in -toplevel-
> for row in tree.iterfind("//Row"):
> AttributeError: 'etree._ElementTre
[EMAIL PROTECTED] wrote:
>> What are you going to do with it after it's sorted?
> I need to isolate all lines that start with two characters (zz to be
> particular)
"Isolate" as in "extract"? Remove the rest?
Then why don't you extract the lines first, without sorting the file? (or sort
it afterw
Stefan Behnel wrote:
> [EMAIL PROTECTED] wrote:
>>> What are you going to do with it after it's sorted?
>> I need to isolate all lines that start with two characters (zz to be
>> particular)
>
> "Isolate" as in "extract"? Remove the rest?
&
Ever heard the word "PLONK"?
Peter Pei harshly top-posted:
> You didn't understand my question, but thanks any way.
>
> Yes, it is true that %s already support unicode, and I did not
> contradict that. But it counts the number of bytes instead of
> characters, and makes things like %-20s out of a
Gabriel Genellina wrote:
> use the Windows sort command. It has been
> there since MS-DOS ages, there is no need to download and install other
> packages, and the documentation at
> http://technet.microsoft.com/en-us/library/bb491004.aspx says:
>
> Limits on file size:
> The sort command has no
abhishek wrote:
> I am having problem parsing following data set from XML. Please
> provide hints on how to rectify this problem.
>
> I am using python2.4 version
>
> this is te test data that i am using --
>
> """
> 1!!!11
> 2@@@22
> 3###33
> 4$$$
Ricardo Aráoz wrote:
> What about :
>
> doc = """
>
>99
>
>
>42
>
> """
That's not an XML document, so what about it?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Ricardo Aráoz wrote:
> I don't know zit about xml, but I might need to, and I am saving the
> thread for when I need it. So I looked around and found some 'real'
> XML document (see below). The question is, how to access s from
> s (any category) but not s.
>
> doc = """
>
>
> expenses: jan
Hi,
Tim Rau wrote:
> I'm working on a game, and I'd like players to be able to define thier
> ships with scripts. Naturally, I don't want to give them the entire
> program as thier romping ground. I would like to invoke a seperate
> interpreter for these files, and give it a limited subset of the
Hai Vu wrote:
> Why don't you try to use Code Colorizer:
> http://www.chamisplace.com/colorizer/cc.asp
Looks like it lacks support for one important language, though...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Steven D'Aprano wrote:
> On Fri, 01 Feb 2008 00:40:01 +1100, Ben Finney wrote:
>
>> Quite apart from a human thinking it's pretty or not pretty, it's *not
>> valid XML* if the XML declaration isn't immediately at the start of the
>> document http://www.w3.org/TR/xml/#sec-prolog-dtd>. Many XML
Stefan Behnel wrote:
> Steven D'Aprano wrote:
>> On Fri, 01 Feb 2008 00:40:01 +1100, Ben Finney wrote:
>>
>>> Quite apart from a human thinking it's pretty or not pretty, it's *not
>>> valid XML* if the XML declaration isn't immediately at t
Hi,
Bernard wrote:
> Is there a way to POST a handmade SOAP request *without* using any
> libraries like SOAPpy?
This might help:
http://effbot.org/zone/element-soap.htm
I didn't try, but it should also work with lxml - which might make a couple of
things a little easier, as it gives you XPath
Ivan Illarionov wrote:
>> Also, for XML documents, they were probably thinking that the
>> documents will be machine-generated most of the time. As far as I can
>> tell, they were right in that.
>
> If anybody has to deal with human-generated XML/HTML in Python it may
> be better to use something
John Henry wrote:
>> Why the HELL has nobody answered my question
>> !
>
> Urhpeople in HELL can't answer your question. Try sending your
> post to HEAVEN...
How do you know people in hell aren't doing any programming in Python?
Especially "Gene Expressio
Paul Sijben wrote:
> I am running into the (apparently) well-known issue with pyrex that
> trying to raise an exception using python2.5 and pyrex will lead to a
> TypeError, as "TypeError: exceptions must be strings, classes, or
> instances, not exceptions.ImportError"
You should use a recent Pyre
Wildemar Wildenburger wrote:
> Arnaud Delobelle wrote:
>>> I believe both set and dict comprehensions will be in 3.0.
>>
>> Python 3.0a1+ (py3k:59330, Dec 4 2007, 18:44:39)
>> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>>
Hi everyone,
I'm very happy to announce the official release of lxml 2.0!
http://codespeak.net/lxml/
http://pypi.python.org/pypi/lxml/2.0
** What is lxml?
"""
In short: lxml is the most feature-rich and easy-to-use library for working
with XML and HTML in the Python language.
lxml is a Pythoni
Steven D'Aprano wrote:
> The same way it knows that " encoding. If the parser knows that the hex bytes
>
> 3c 3f 78 6d 6c
>
> (or 3c 00 3f 00 78 00 6d 00 6c 00 if you prefer UTF-16, and feel free to
> swap the byte order)
>
> mean "
> then it can equally know that bytes
>
> 20 09 0a
>
> a
Steven D'Aprano wrote:
> On Fri, 01 Feb 2008 07:51:56 +1100, Ben Finney wrote:
>
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>
>>> On Fri, 01 Feb 2008 00:40:01 +1100, Ben Finney wrote:
>>>
Quite apart from a human thinking it's pretty or not pretty, it's
*not valid XML* if the XML de
Peck, Jon schrieb:
> Yes, the characters were from the 0-127 ascii block but encoded as utf-16, so
> there is a null byte with each nonzero character. I.e.,
> \x00?\x00x\x00m\x00l\x00
>
> Here is something weird I found while experimenting with ElementTree with
> this same XML string.
>
> Con
Hi,
Peck, Jon top-posted:
>> Stefan Behnel wrote:
>> No. The internal representation of unicode characters is platform
>> dependent, and is either 2 or 4 bytes per character. If you want UTF-16,
>> use ".encode()".
>
> Thanks. The two users having the p
geoffbache wrote:
> I have some marked up text and would like to convert it to plain text,
> by simply removing all the tags. Of course I can do it from first
> principles but I felt that among all Python's markup tools there must
> be something that would do this simply, without having to create a
agc wrote:
> I guess an important feature of what I'm looking for is
> some kind of mapping from *exact* title to corresponding article,
> i.e. if my data set wasn't so large, I would just keep all my
> data in a in-memory Python dictionary, which would be very fast.
>
> But I have about 2 million
Daniel Fetchinson wrote:
> I'm looking for a simple text based GUI definition format and
> associated python modules to work with it that is capable of defining
> simple GUI's for *both* the web and the desktop. I have an application
> that is accessible through the web and also through desktop
> a
Hi,
Daniel Fetchinson wrote:
>> On the other hand, if you want pure HTML for your web app, maybe you should
>> consider making the desktop app HTML-based, too?
>
> Jorge Godoy brought that up too, sounds pretty good, but how would
> that work? The desktop app would launch a mini webserver and the
[EMAIL PROTECTED] wrote:
> I'm considering writing a little interpreter for a python-like
> language
[...]
> I'd also like to implement most of the planned Python 3000 changes.
In case you're interested in a real project, consider taking a look at Cython,
which is a Python-to-C compiler for writin
Daniel Fetchinson wrote:
>>> is there a GUI toolkit library for python which can render html?
>> At least GTK comes with libgtkhtml, but I bet there are others, too.
Ah, and there is also WebKit. Don't know how stable the Python bindings are,
but you might know WebKit as part of Apple's browser.
[EMAIL PROTECTED] wrote:
> I'm parsing a log file that's being written out in
> real time.
> This is part of an event loop, so I want to have some code
> that looks like this:
>
>when logfile is readable:
>read one node, including children
>but don't try to read past , so that
[EMAIL PROTECTED] schrieb:
> Mike C. Fletcher:
>> Not sure if Mono also provides a speedup.
>
> There is a set of good benchmarks here, the answer is negative:
> http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&lang=iron
This doesn't look like Mono to me:
IronPython 1.1 (
Isaac Gouy wrote:
> On Feb 5, 11:47 am, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] schrieb:
>>
>>> Mike C. Fletcher:
>>>> Not sure if Mono also provides a speedup.
>>> There is a set of good benchmarks here, the answer is nega
Fuzzyman wrote:
> On Feb 5, 7:47 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] schrieb:
>>
>>> Mike C. Fletcher:
>>>> Not sure if Mono also provides a speedup.
>>> There is a set of good benchmarks here, the answer is nega
[EMAIL PROTECTED] wrote:
> Paul Rubin:
>> I like the suggestion, except it should be
>> port = int(sys.argv.get(1, '8000'))
>> one could imagine your example going wrong in a protocol where 0 is
>> a valid port number.
>
> I think a high-level language like Python must have boolean operators
Santiago Romero wrote:
> I'm impressed with python. I'm very happy with the language and I
> find Python+Pygame a very powerful and productive way of writing 2D
> games. I'm not, at this moment, worried about execution speed of the
> small game I'm working on (it runs at full 60 fps even in an old
[EMAIL PROTECTED] wrote:
> On Feb 5, 9:14 pm, Bernard <[EMAIL PROTECTED]> wrote:
>> On 5 fév, 10:09, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> wrote:
>
>>> Are there any good approaches of doing this kind of thing that I've
>>> missed, or am I resigned to having HTML and Python code mixed and so
Denis Bilenko wrote:
> Raymond Hettinger wrote:
>> If positions 0 and 1 are optional, how do you expect to know whether
>> "path" is going to be at position 2? This problem doesn't exist with
>> dictionaries because the presence or absence of optional entries does
>> not affect the key reference t
Neal Becker wrote:
> I see list has index member, but is there an index function that applies to
> any sequence type?
Like this?
def find_index(seq, value):
try:
find_index = seq.index
except AttributeError:
def find_index(value):
for i,v in enumera
Jean-Paul Calderone wrote:
> On Thu, 07 Feb 2008 11:03:12 +0100, Stefan Behnel <[EMAIL PROTECTED]>
> wrote:
>> Take a look at Cython. It's an optimising Python-to-C compiler for
>> writing
>> Python extensions. So you can basically take a Python module and
&
Bjoern Schliessmann wrote:
> Learning English also is not too hard. So everyone should be
> capable of writing poetry of Shakespeare niveau.
You're lucky that you can infer anything from a wrong statement.
http://www.mipmip.org/tidbits/pronunciation.shtml
Stefan
--
http://mail.python.org/mailma
Simon Pickles wrote:
> ImportError:
> /usr/lib/python2.5/site-packages/_xmlplus/parsers/pyexpat.so: undefined
> symbol: PyUnicodeUCS4_Decode
You changed the build-time configuration of your Python installation, so you
should rebuild PyXML for the new interpreter (or uninstall it, as you don't
need
Steven D'Aprano wrote:
> On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote:
>
>> On Fri, 08 Feb 2008 05:12:29 -0800, Ryszard Szopa wrote:
>>
>>> Expressing simple loops as C for loops...
>> You mean simple loops like ``for i in xrange(1000):``? How should the
>> compiler know wha
js wrote:
> I'm looking for RSS/ATOM generator I can use in Python.
> I searched on pypi and the other places but I couldn't find any
> options on this. (I found many parsers, though)
> Is there any de-fact standard RSS/ATOM generator? (especially, I'd
> like to create Atom's)
> Do I have to do it
Hi,
shashank jain top-posted:
> On Feb 11, 2008 11:15 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>
>> jainshasha wrote:
>>> well i have create a program which can read out the html source code
>>> files or any other web page source code files through my prog
jainshasha wrote:
> well i have create a program which can read out the html source code
> files or any other web page source code files through my program so
Like this?
>>> from lxml import html
>>> page = html.parse("http://www.google.com";)
>>> print page.find("//title").text
Google
h
geoffbache wrote:
> I have some marked up text and would like to convert it to plain text,
> by simply removing all the tags. Of course I can do it from first
> principles but I felt that among all Python's markup tools there must
> be something that would do this simply, without having to create a
Neal Becker wrote:
> # OOo's libraries
> import uno
>
> IIUC, this is the same problem. This uno module is tied to an old python
> (2.2?) that ships with OO. Is it available standalone to build for python
> 2.5?
Roll your own OpenOffice server:
http://pypi.python.org/pypi/z3c.recipe.openof
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
Torsten Bronger wrote:
> Terran Melconian writes:
>
>> On 2008-02-11, js <[EMAIL PROTECTED]> wrote:
>>
>>> Is there any de-fact standard RSS/ATOM generator? (especially,
>>> I'd like to create Atom's) Do I have to do it myself from
>>> scratch?
>> I looked into similar issues about six months ago.
Torsten Bronger wrote:
> js writes:
>
>> Trivial?
>> More than XML::Atom::Feed?
>> http://search.cpan.org/~miyagawa/XML-Atom-0.28/lib/XML/Atom/Feed.pm
>
> Excerpt from my code:
>
> root = ElementTree.Element("feed", xmlns="http://www.w3.org/2005/Atom";)
> ElementTree.SubElement(root, "id
Torsten Bronger wrote:
> Stefan Behnel writes:
>
>> Torsten Bronger wrote:
>>
>>> [...]
>>>
>>> Excerpt from my code:
>>>
>>> root = ElementTree.Element("feed", xmlns="http://www.w3.org/2005/Atom";)
>>&g
[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
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
[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
[EMAIL PROTECTED] wrote:
> I think the speed function may be broken from the turtle graphics
> package
>
>
> "from turtle import *
>
> speed('fastest')
>
> forward(50)"
>
>
> I have tried all of the different speed settings, but I get no change
> in the turtle's speed does anyone know how
[EMAIL PROTECTED] wrote:
> I have a single unicode file that has descriptions of hundreds of
> objects. The file fairly resembles HTML-EXAMPLE pasted below.
>
> I need to parse the file in such a way to extract data out of the html
> and to come up with a tab separated file that would look like O
[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
Hi,
Ryan K wrote:
> If I have a cElementTree.ElementTree (or the one from the Standard
> Library), can I use lxml's validation features on it since it
> implements the same ElementTree API?
Not directly. lxml and cElementTree use different tree models internally, so
you can't just apply C-impleme
samuraisam wrote:
> Has anyone done any recent testing as to which current python
> implementation is the quickest?
Search for a recent thread on CPython and IronPython.
> Perhaps for Django development -
> though the current one certainly is fast (and I doubt micro
> optimizations would make mu
zaley wrote:
> Is there a open souce IDE writen by C( C++) or partly writen by C( C+
> +)?
Tons of them. What do you want to do with it?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Rufman wrote:
> Does anyone know how to get docstrings (reStructuredText) out of
> python source code using docutils?
Depends on what you mean with "get ... out of". There are tools like epydoc
that generate source code documentation, maybe that's what you mean?
Stefan
--
http://mail.python.org/
mark wrote:
> I've recently switched from Ubuntu to OS X Leopard. I have some python
> scripts which download info from the web. The scripts were working fine
> before on Ubuntu, but urllib seems to work really slowly on Leopard.
>
> I tried an example from the docs:
>
import urllib2
f
Allen Peloquin wrote:
> class B
> {
> fun(A x, A y, A z)...
> fun(A1 x, A y, A z)...
> }
>
> class B1
> {
> fun(A1 x, A y, A z)...
> }
>
> Such that any previous behavior is inherited, but behaves
> polymorphically because of the single function name.
Try something like this:
class
Stefan Behnel wrote:
> Allen Peloquin wrote:
>> class B
>> {
>> fun(A x, A y, A z)...
>> fun(A1 x, A y, A z)...
>> }
>>
>> class B1
>> {
>> fun(A1 x, A y, A z)...
>> }
>>
>> Such that any previous behavior is in
801 - 900 of 1800 matches
Mail list logo