Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Stefan Scholl wrote:
>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>> Stefan Scholl wrote:
>>>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>>>> Stefan Scholl wrote:
>>>>>> Well
Stefan Scholl wrote:
> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> Stefan Scholl wrote:
>>> Well, http://docs.python.org/lib/module-xml.sax.html is missing
>>> the fact, that I can't use Unicode with parseString().
>>>
>>> This parseString(
Chris Mellon <[EMAIL PROTECTED]> wrote:
> XML is not a string. It's a specific type of bytestream. If you want
> to work with XML, then generate well-formed XML in the correct
> encoding. There's no reason you should have an XML document (as
> opposed to values extracted from that document) in unic
Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Stefan Scholl wrote:
>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>> Stefan Scholl wrote:
>>>> Well, http://docs.python.org/lib/module-xml.sax.html is missing
>>>> the fact, that I can't use Un
Stefan Scholl wrote:
> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> Stefan Scholl wrote:
>>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>>> Stefan Scholl wrote:
>>>>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>>>>> Ste
Stefan Scholl wrote:
> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> The XML is *not* well-formed if you pass Python unicode instead of a byte
>> encoded string. Read the XML spec.
>
> Pointers, please.
There you have it:
http://www.w3.org/TR/xml/#charencoding
"
Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Stefan Scholl wrote:
>> Stefan Behnel <[EMAIL PROTECTED]> wrote:
>>> The XML is *not* well-formed if you pass Python unicode instead of a byte
>>> encoded string. Read the XML spec.
>>
>> Pointers, ple
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Fri, 27 Jul 2007 06:47:48 +0200, Stefan Scholl wrote:
>
>> Chris Mellon <[EMAIL PROTECTED]> wrote:
>>> XML is not a string. It's a specific type of bytestream. If you want
>>> to wo
Stefan Scholl schrieb:
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> On Fri, 27 Jul 2007 06:47:48 +0200, Stefan Scholl wrote:
>>
>>> Chris Mellon <[EMAIL PROTECTED]> wrote:
>>>> XML is not a string. It's a specific type
er BeautifulSoup for parsing (just in case you're not
dealing with HTML-like pages, but just with real tag soup), you can also use
the ElementSoup parser:
http://codespeak.net/svn/lxml/branch/html/src/lxml/html/ElementSoup.py
but lxml is generally quite good in dealing with broken HTML already.
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 7/26/07, Stefan Scholl <[EMAIL PROTECTED]> wrote:
>> Chris Mellon <[EMAIL PROTECTED]> wrote:
>> > XML is not a string. It's a specific type of bytestream. If you want
>> > to work with XML, then gen
Stefan Scholl wrote:
> Chris Mellon <[EMAIL PROTECTED]> wrote:
>> On 7/26/07, Stefan Scholl <[EMAIL PROTECTED]> wrote:
>>> Chris Mellon <[EMAIL PROTECTED]> wrote:
>>>> XML is not a string. It's a specific type of bytestream. If you want
>&g
Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Stefan Scholl wrote:
>> But the style of the answers makes me wonder if I should report
>> the bug in xml.sax (or its documentation) or just ignore it.
>
> Note that PyXML is no longer actively maintained, so it's unlike
Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 7/28/07, Stefan Scholl <[EMAIL PROTECTED]> wrote:
>> Just checked on a system without PyXML: xml/sax/__init__.py
>> defines parseString() and uses cStringIO (when available).
>>
>> Python 2.5.1
>>
>
>
Stefan Scholl wrote:
> Chris Mellon <[EMAIL PROTECTED]> wrote:
>> On 7/28/07, Stefan Scholl <[EMAIL PROTECTED]> wrote:
>>> Just checked on a system without PyXML: xml/sax/__init__.py
>>> defines parseString() and uses cStringIO (when available).
>>>
Michael L Torrie <[EMAIL PROTECTED]> wrote:
> Stefan Scholl wrote:
>> Don't let the subject line fool you. I'm OK with cStringIO. The
>> thread is now about xml.sax's parseString().
>
> Giving you the benefit of the doubt here, despite the fact that St
Stefan Scholl wrote:
> Michael L Torrie <[EMAIL PROTECTED]> wrote:
>> xml.sax's use of parseString() is exactly correct. xml.sax should
>> *never* parse python unicode strings as by definition XML must be
>> encoded as a *byte stream*, which is what a python string
able 'str' directly. I'm still pretty new
>> to Python so if someone could explain to me why this isn't working and what
>> I can do to achieve the same effect I would greatly appreciate it.
I assume what you are actually looking for is the os.path module.
Try one of these (I looked for "minidom example"):
http://www.faqs.org/docs/diveintopython/kgp_parse.html
http://docs.python.org/lib/dom-example.html
http://www.cutthecrap.biz/software/whitepapers/minidom.html
Maybe that helps?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
he string it is hard to find it.
I guess you can't afford to wait for Python 3, can you?
http://www.python.org/dev/peps/pep-3100/#atomic-types
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Apart from that, see here:
http://www.python.org/emacs/
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
is not the intended behaviour.
As in Python itself you can catch SystemExit, I think this should be
the way to go. But how do I catch this exception from within the C API?
Thanks in advance for any hints.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
First of all, I'm sorry to followup my own posting, but I can add a few
things ...
On Thu, 02 Aug, Stefan Bellon wrote:
> As in Python itself you can catch SystemExit, I think this should be
> the way to go. But how do I catch this exception from within the C
> API?
I now installe
dled but raised "out of" the interpreter. So I am unsure of what you
mean with "Call python code".
When installing an excepthook (see my other posting), then I can indeed
catch all exceptions ... except for SystemExit which is the one I'm
after.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 02 Aug, Farshid Lashkari wrote:
> You cannot use PyRun_SimpleString, since it will automatically print
> and clear the error. You will need to use PyRun_String instead.
Thanks, that helps a lot!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
//codespeak.net/svn/lxml/branch/html/
A release is expected soon.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
enting it) might not be that easy...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
PyRun_String functions and
execute a string with the content "execfile('filename')".
Is there a way to solve this problem with PyRun_File?
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way around this? Can I add some sort of __del__() to the
generator object so that in case of an early destruction of the
generator object, the external resource is freed as well?
I'm looking forward to hearing your hints!
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 08 Aug, MRAB wrote:
> Simple! :-)
Sorry, I forgot to mention that I am forced to using Python 2.4.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
lse in a way that works even with Python
2.4 and can then be nicely written without cluttering up the logic
between consumer and producer?
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Aug, Kay Schluehr wrote:
> On Aug 9, 1:14 am, Stefan Bellon <[EMAIL PROTECTED]> wrote:
> > Sorry, I forgot to mention that I am forced to using Python 2.4.
> It doesn't matter. You can use try...finally as well in Python 2.4.
> It's just not possible to
em1', 'Item2', 'Item3', 'Item4']
But I do not see an output of "gen del" which makes me think that the
destructor is not called, thus not releasing the resource. It seems I
have not completely understood how generators work ...
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
led.
When taking out the yield statement, __del__ is called again. It looks
to me that as soon as a generator function is involved in the class,
the __del__ is not called anymore.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Aug, Marc 'BlackJack' Rintsch wrote:
> On Sat, 11 Aug 2007 14:50:33 +0200, Stefan Bellon wrote:
> > But then, even when terminating the interpreter, __del__ is not
> > called.
>
> Because that is not guaranteed by the language reference. The reason
&
Madhu Alagu wrote:
> Hi
>
>
>
> Python + XUL Success Stories
>
>
>
>
> Thanks
>
> Madhu Alagu
Any chance you forgot to ask a question?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
is
>>> text = element.text or ""
BTW, you'd be even more surprised to see that ET can actually /store/ "" as
text if you tell it to, and then returns an empty string when you ask for the
.text property. But any empty text coming from the parser will alway
rocess more or less
like a thread, thus avoiding GIL issues completely.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
x27;s because "Unicode" is more than one alphabet. unicode objects compare
based on the Unicode character value, so sort() does alike.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
speak.net/lxml/dev
and you can (easily) install it from Subversion sources:
http://codespeak.net/svn/lxml/trunk
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
t's only a matter of
> taste.
lxml.html handles bad HTML and it's a powerful tool that is very easy to use.
And if one day you have to deal with really, *really* broken tag soup, it also
comes with BeautifulSoup parser integration.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
d it IS subversion).
It's Google, though, so it requires people to register with Google to work on
the project. Might be a blocker for some contributors.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
support by now. You can choose between CVS
or SVN.
Berlios works alike, and it's Europe based.
http://developer.berlios.de/
> I'm not sure what Launchpad uses.
Launchpad is Ubuntu, meaning it uses Bazaar. It has SVN integration, though.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
parator)
>
> def mycomparator(a, b):
> #do
Taking advantage of stable sorting is totally not a hack. The OP just tried
the two sorting steps in the wrong order.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
lement of a list and 'tail' matches the rest? I
could not find this in the Python documentation.
Regards,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
with picked content here
>
> now that I have the contents tag randomly chosen, how do I delete the
> parent tag, and replace it to look like this:
>
> final xml sample (goal):
> Here is some content.
> Here is some random content.
> Here is some content.
what about:
r.getparent().replace(r, random.choice(r))
?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
[undermotivated blah stripped]
don't feed the troll.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Eric CHAO wrote:
> I think many python developers don't need such an IDE actually. Just
> like Ruby guys, they use a powerful editor, for example, Textmate,
> instead of all-in-one IDE. It's quick and direct.
True. However, some use neither an editor nor an IDE but Emac
when
iterables are involved.
Stefan
"Matimus" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>> Is there a pattern matching construct in Python like (head : tail),
>> meaning
>> 'head' matches the first element of a list and 'tail
:
parent[2:3] = child[1:5]
should work.
> lxml rocks!
I know, but it feels good to read it once in a while. :)
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
is (the invalid character is the
> final é of Université):
>
> /C=BE/O=BEGRID/OU=Physique/OU=Univesité Catholique de
> Louvain/CN=Roberfroid
>
>
> I have tried several options but I am not able to avoid this
> problem. Any idea?.
Looks like the page is not well-formed XML (i.e. not XML at all). If it
doesn't specify an encoding (), you can try recoding the
input, possibly decoding it from latin-1 and re-encoding it as UTF-8 before
passing it to the SAX parser.
Alternatively, tell the page authors to fix their page.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
m/rss/rss.xml";)
> nTree = ET.parse(news)
> for item in nTree.getiterator("title"):
> print item.text
>
> Whether I try this for title or link, nothing is printed.
Your document uses namespaces. What you are looking for is not the tag "title"
without a nam
.XPath("//channel[title = $title]")
>>> tree = objectify.parse("http://somewhere/the_document.xml";)
>>> channel = find_channel(tree, title="example title")
>>> print channel.title, channel.link
http://codespeak.net/lxml
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
instances
running in any COM client.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Tim Golden
> Sent: Friday, August 31, 2007 1:36 PM
> To: Thomas Rademacher
> Cc: python-list@python.org
> Subject: Re: win
codespeak.net/lxml/objectify.html#element-access-through-object-attributes
http://codespeak.net/lxml/objectify.html#python-data-types
http://codespeak.net/lxml/objectify.html#defining-additional-data-classes
It's part of lxml, which makes it plenty fast, highly flexible and gives you
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
...
> The problem with Java is that it makes it very painfull to bridge two
> APIs together, while Python usually makes it a breeze (easy
> delegation, no dumb-ass psycho-rigid type system). So Java's solution
> (hyper-formalization) isn't necessary
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes:
> On Thu, 06 Sep 2007 09:00:02 +0200, Stefan Arentz wrote:
>
> > What I find really frustrating in Python (combined with usually bad
> > documentation) is that many people have different styles. The most
>
Michele Simionato <[EMAIL PROTECTED]> writes:
> On Sep 5, 9:54 pm, MarkyMarc <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I want to make a web service application in python and keywords are
> > RESTful, python and nice urls(urls mapped to python objects).
> >
> > I don't want a big framework but
t;, writer_name="html")
>
>
>
> would do the trick, but that produces an entire document with
> an embedded style block.
try this::
import docutils.core
parts = docutils.core.publish_parts("Hello!", writer_name="html")
html = parts[
[EMAIL PROTECTED] writes:
> Hi there
>
> I am fairly new to Python and have not really used regular expressions
> before (I think this might be needed for my query) and wondered if you
> could help
>
> I have a step class and store in a list step instances
> A step instance contains variables: n
)
>> #end for
>
> What do you mean by not possible!? This compiles fine for me.
He means he has to use backslashes instead of parentheses here.
Which is not true, you could easily rephrase this as:
for link in GetEachRecord(
"links",
):
out.write(
)
See? No backslash!
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Miki <[EMAIL PROTECTED]> writes:
> > steps.sort(key = lambda s: s.time)
> This is why attrgetter in the operator module was invented.
> from operator import attrgetter
> ...
> steps.sort(key=attrgettr("time"))
Personally I prefer the anonymous function over attrgettr :)
S.
--
http://mail.pyt
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Stefan Behnel wrote:
>
>> He means he has to use backslashes instead of parentheses here.
>>
>> Which is not true, you could easily rephrase this as:
>>
>> fo
hich is precisely the point.
This actually sounds somewhat pointless to me. If complex things don't fit
into one line, a good way to deal with it is not to insist on making them a
single statement.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] (Alex Martelli) writes:
> Stefan Arentz <[EMAIL PROTECTED]> wrote:
>
> > Miki <[EMAIL PROTECTED]> writes:
> >
> > > > steps.sort(key = lambda s: s.time)
> > > This is why attrgetter in the operator module
de-and-elementinclude
http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk
It's not half as complicated as SAX, BTW.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ise in a language.
>
> If this was needless, why do C++ and Java have the "this" pointer?
Be careful when you use the word "needless" in the context of Java.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
raight forward support for generating HTML
and comes with a lot of nice goodies for HTML handling:
http://codespeak.net/lxml/dev/lxmlhtml.html#creating-html-with-the-e-factory
Note that this requires lxml 2.0, which is currently in alpha status.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
st hand in the result of
urlopen().
Apart from that, I saw that you found your way to the lxml mailing list, I'll
respond over there.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
first
parameter (like in Ada 95) or you can call the method on the object
(like in Java, C++, Python, ...) and the object is passed implicitly.
--
Stefan Bellon
--
http://mail.python.org/mailman/listinfo/python-list
Nicholas Parsons <[EMAIL PROTECTED]> wrote:
> I realize that in this context it is used for removing a specific key
> from the current dictionary object. But why call it pop and not
> something more intuitive like remove or delete?
I wasn't a python programmer back than, but I'd guess it's
be
no-one mentioned lxml so far:
http://codespeak.net/lxml
http://codespeak.net/lxml/dev/parsing.html#parsers
Parse it as HTML and then use anything from XPath to XSLT to treat it.
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
he xml -> python and python->xml
> marshalling/unmarshalling much like jaxb for java.
Consider using lxml.objectify. It's extremely powerful and simple to use at
the same time.
http://codespeak.net/lxml/dev/objectify.html#element-access-through-object-attributes
http://codespeak.net/lxml
metaperl wrote:
> Without even checking them all out, I'm thinking the Amara XML Toolkit
> must be the most feature-packed.
Please check out lxml before you post FUD like this.
http://codespeak.net/lxml/
Regards,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Hi NG,
i'm hanging with following problem in python:
i have installed PyX to generate eps in python. in console-mode (call
python in shell) there are no problem. calling pyx via python-script i
got the following error (in a python ide f.e. wing2.0):
ImportError: No module named _pykpathsea
Have i
already be what you were
looking for anyway.
http://codespeak.net/lxml
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
t; city="LA"/>
>pl_h="No Data" name="MyHouse" address="there" phone="555-5556"
> country="US" city="New York"/>
>
This should help you to get namespaces working:
http://effbot.org/zone/element.htm#xml-namespaces
Hope it helps,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> for row in csvreader:
> mainbox = SubElement(root, "{Boxes}box")
> r2 = csv.reader(myfile)
> b = r2.next()
> mainbox.put("city", b[10])
[...]
ElementTree(root).write('test.xml', "UTF-8", xml_declaration=True,
pretty_print=True)
Hope it helps,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
That's why I was asking why you need this. Validation is provided by RNG
itself, so all you would need is some kind of mapping that outputs and parses
it for you? What's your target format? Python objects?
http://codespeak.net/lxml/objectify.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ZeeGeek wrote:
> Is there a module for python to standardize XML? Since MSN Live Space
> doesn't use standard XML in the posts, I want to standardize them so
> that I can use them elsewhere.
Could you give a hint what you mean with "standardize"? What's non
stan
have beautiful plumage!".split():
yield word
def __iter__(self):
self.generator = self._next()
return self
def next(self):
return self.generator.next()
cheers,
stefan
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
> Any suggestions on how to teach the built-in ET-parser entities?
As you already do it in your code.
http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
But I guess your version of cET is just too old.
Stefan
--
http://mail.python.
Stefan Behnel wrote:
> Diez B. Roggisch wrote:
>> Any suggestions on how to teach the built-in ET-parser entities?
>
> As you already do it in your code.
>
> http://effbot.org/elementtree/elementtree-xmlparser.htm#tag-ET.XMLParser.entity
Hmmm, I never needed this, but the
; for i in s:
> ... if i!="\\":
> ... newS=newS+i
I'm not quite sure what you're trying to achieve, but I'd use
>>> r"\\a\\b\c".replace("", "")
'ab\\c'
>>> r"\\a\\b\c".replace("\\", "")
'abc'
Note that "\\" in the source is unescaped to "\" in the string. Use r"\\" to
prevent that.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
dpi)
> raster_image.write(out_file)
>
> Thanks for any pointers you might have.
The GIMP can do it, and you can even program it in Python.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
esn't add any namespaces, so you will not magically get valid
XHTML or something. You could rewrite the tags by hand, though.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis wrote:
> Given that you can do in 2 lines what
> took you around 15 with lxml, I wouldn't think it twice.
Don't judge a tool by beginner's code.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
tart from that:
row = tree.find("//Row")
print row.findtext("primaryowner")
print row.findtext("customeraddress")
See the lxml tutorial on this, as well as the documentation on XPath support
and tree iteration:
http://codespeak.net/lxml/xpathxslt.html#xpath
http://codespeak.net/lxml/api.html#iteration
Hope this helps,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Pointal wrote:
> I can no longer get codespeak's lxml page at http://codespeak.net/lxml/
> (get an empty HTML document Transitional//EN">)...
>
>
> Am-I alone in this case ?
> Any codespeaker reading ?
Hmm, it's working for me...
Stefan
--
htt
Error: 'NoneType' object has no attribute 'findtext'
Well, error handling is up to you. If find() doesn't find what you are looking
for, it will return None. Note that tag names are case sensitive - or maybe
there are namespaces involved, cannot tell from the example you posted.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Laurent Pointal wrote:
> I use lxml to parse a document, modify some elements in the tree, run
> xinclude on it (thanks to Stefan Behnel for the pointer), and finally use
> the data to feed my sax-aware tool.
>
> To report warnings/errors to the user (not related to XML itself,
ant
(and feature rich anyway).
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
tware that can process XML and HTML the same way *and* that
supports XPath and tree iteration so that you can easily select the content
you want.
http://codespeak.net/lxml/
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
gt;
>> Oh, and
>> <http://ars.userfriendly.org/cartoons/?id=20070910&mode=classic>.
>
> Esc-Meta-Alt-Ctrl-Shift? :)
Yep, that's five of them.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
you use it as a news
>>> client :/)
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
;>>> print 'toto' in a
> True
Not sure what you're trying to achieve, but the semantics of the "in" operator
make it return a boolean value. The string "yop" evaluates to the boolean
value True, as it is not empty.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Michael v. Fondern wrote:
> (Ctrl-Shift-Down)
Is this the opposite of thumbs up, or is it just to suggest that Eclipse can
come close to Emacs's usability if you try hard?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
re responding, removing quoted text irrelevant to your response.)
>>>>
>>
>> Wayne, may I second Ben on his suggestion to stop top-posting ?
>
> Well, you may. Unfortunately, there are many NGs that do the opposite.
Well, not this one.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
ldren = list(body)
div = etree.SubElement(body, "div", {"class" : "remapped"})
div.extend(children)
http://codespeak.net/lxml/
and for lxml.html, which is currently in alpha status:
http://codespeak.net/lxml/dev/
ET 1.3 will also support the extend() function, BTW.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
/element_classes.html
http://codespeak.net/lxml/dev/element_classes.html#id1
Especially these two class lookup schemes might be handy:
http://codespeak.net/lxml/dev/element_classes.html#custom-element-class-lookup
http://codespeak.net/lxml/dev/element_classes.html#namespace-class-lookup
And here is an example:
http://codespeak.net/svn/lxml/trunk/src/lxml/html/__init__.py
Have fun,
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
901 - 1000 of 2239 matches
Mail list logo