contro opinion, 23.01.2012 08:34:
> import lxml.html
> myxml='''
>
>
>
>
> table="tpa_radio_sum">
>
>
>
>
>
>
> '''
> root=lxml.html.fromstring(myxml)
> nodes1=root.xpath('//job[@DecreaseHour="1"]')
> nodes2=
Michael Torrie, 02.02.2013 19:29:
> On 02/02/2013 03:19 AM, Luuk wrote:
>> On 02-02-2013 11:01, Armin Karner wrote:
>>> MySQLdb for python versions 3.3 or higher
>>
>> http://lmgtfy.com/?q=MySQLdb+for+python+versions+3.3+or+higher
>
> Embarrassingly, most of the links on the google search results
Bas, 05.02.2013 16:10:
> at work, we are thinking to replace some legacy application, which is a
> home-grown scripting language for monitoring and controlling a large
> experiment. It is able to read live data from sensors, do some simple
> logic and calculations, send commands to other subsystems
gmspro, 08.02.2013 14:03:
> One said, Python is not programming language, rather scripting language, is
> that true?
Apples and oranges. It's a bit like asking if C is an embedded systems
language or if JavaScript is a 3D graphics language. Well, no, but you can
use them for that if you want. Tha
Giles Coochey, 15.02.2013 12:24:
> On 14/02/2013 21:52, Steven D'Aprano wrote:
>> Hello all,
>>
>> The Python Software Foundation is the organisation which protects and
>> manages the "boring" bits of keeping a big open source project alive: the
>> legal and contractual parts, funding for projects,
Steven D'Aprano, 26.02.2013 13:18:
> Nuitka is an implementation of Python written in C++. At the moment it is
> claimed to be about 2.5 times as fast as CPython running the pystone
> benchmark.
Could we please get to the habit of not citing results of "benchmarks" that
*any* static analysis pha
Steven D'Aprano, 28.02.2013 08:05:
> On Wed, 27 Feb 2013 21:11:25 -0500, Terry Reedy wrote:
>
>> There is a problem with timer overhead for sub-microsecond operations.
>> In interactive use, the code is compiled within a function that gets
>> called. The string 'abc需' should be stored as a const
Steven D'Aprano, 28.02.2013 14:23:
> On Thu, 28 Feb 2013 08:07:55 +0100, Stefan Behnel wrote:
>
>> Steven D'Aprano, 26.02.2013 13:18:
>>> Nuitka is an implementation of Python written in C++. At the moment it
>>> is claimed to be about 2.5 time
kramer65, 28.02.2013 21:25:
> I'm using Python for a while now and I love it. There is just one thing
> I cannot understand. There are compilers for languages like C and C++.
> why is it impossible to create a compiler that can compile Python code
> to machinecode?
All projects that implement such
Stefan Behnel, 28.02.2013 22:03:
> there are also a couple of projects that do
> dynamic runtime compilation, most notably PyPy and Numba.
Oh, and HotPy, I keep forgetting about that.
> You may want to take a look at the Python implementations page,
> specifically the list of Pyth
Steven D'Aprano, 01.03.2013 04:47:
> On Thu, 28 Feb 2013 22:03:09 +0100, Stefan Behnel wrote:
>
>> The most widely used static Python compiler is Cython
>
> Cython is not a Python compiler. Cython code will not run in a vanilla
> Python implementation. It has differen
Ian Kelly, 07.03.2013 18:31:
> On Thu, Mar 7, 2013 at 9:20 AM, Christian Heimes wrote:
>> Am 07.03.2013 17:00, schrieb Ian Kelly:
>>> On Thu, Mar 7, 2013 at 4:22 AM, Wolfgang Maier wrote:
Well, it skips the costly len() call because your iter(Foo()) returns
iter(range()) under the hood an
olsr.ka...@gmail.com, 15.03.2013 13:00:
> i maybe don't talk english very well but at least i am not a Rude,and you are
> not obligated to answering me much less Mocking me ,i assure you that i
> will not post anything anymore jackass
> thank you alex23
As Chris pointed out, the real probl
dmitre...@gmail.com, 15.03.2013 14:36:
> I'm glad to inform you about new OpenOpt Suite release 0.45 (2013-March-15):
> * Essential improvements for FuncDesigner interval analysis (thus affect
> solver interalg)
> * Temporary walkaround for a serious bug in FuncDesigner automatic
> differenti
Terry Reedy, 22.03.2013 00:05:
> I never imagined that there were people who would mix up 'tuner' and
> 'tuna'. Live and learn.
I assume you know "The Chaos" ?
http://ncf.idallen.com/english.html
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Joshua Landau, 06.04.2013 12:27:
> On 5 April 2013 03:29, John Ladasky wrote:
>> I'm revisiting a project that I haven't touched in over a year. It was
>> written in Python 2.6, and executed on 32-bit Ubuntu 10.10. I experienced
>> a 20% performance increase when I used Psyco, because I had a
>>
Roy Smith, 12.04.2013 17:33:
> Giampaolo Rodol� wrote:
>
>> Hi there folks,
>> I'm pleased to announce the 0.7.0 release of psutil:
>> http://code.google.com/p/psutil/
>
> I see a lot of these types of announcements. May I suggest that people
> add a short description of what that package is.
Steven D'Aprano, 17.04.2013 11:16:
> If you look at the node.js site, the first thing that jumps out at me is
> that the culture encourages churning out packages rather than encouraging
> quality packages. The front page offers author recognition for being
> prolific, but not for writing good co
I'm happy to announce that Cython 0.19 has been released. This is a feature
release of the Cython compiler that adds some major usability improvements
especially for code that needs to run in both Py2 and Py3, as well as
better Python compatibility and optimisations.
http://cython.org/
You can g
Devin Jeanpierre, 28.04.2013 19:55:
> Last night I wrote a toy prototype module that lets one compile Rust
> crates into extension modules for Python. The problem is, I don't know
> the "right" way to do this. Ideally I'd just want to tell build_ext
> that there's a new source type I want to handle
Dave Butler, 23.04.2013 16:52:
> with gdb, can you find referents of an object given an object id?
Have you looked at the gc module? And, could you explain why you want to
work with the object's ID instead of the object reference itself?
Stefan
--
http://mail.python.org/mailman/listinfo/python
Hi!
I need to generate source code (mainly Java) from a domain specific XML
language, preferably from within a Python environment (since that's where the
XML is generated).
I tried using XSLT, but I found that I need a template system that supports
Python interaction. I know, lxml's XSLT support
bruno at modulix wrote:
> Stefan Behnel wrote:
>> I need to generate source code (mainly Java) from a domain specific XML
>> language, preferably from within a Python environment (since that's where the
>> XML is generated).
>>
>> I tried using XSLT, but I fo
Hi Claudio,
cz wrote:
>> Perhaps you need to rephrase your question.
>> --
>> Steven.
>
> Thanks for your reply.
> OK, I'll try to make this more clear:
> My list called "elten" looks like that:
>
> [Tensor: id = 1, intensity = 2976.52
> xx = -1447.32, xy = 52.458, xz = -594.186
> yy = -1090.
cz schrieb:
>> The list above is not a valid Python list. What is it that you store in that
>> list?
>>
>> Or is it maybe a dictionary?
>>
>> Stefan
>
> Thanks for your help. How can I find out about what this is? As I said
> it's generated by a insufficiently documented module. So if this is a
>
victor wrote:
> I want to generate a report and the PDF fits perfectly. Though there is
> an issue of using different encoding in the doc. I tried PyPS with no
> success. I need a lib that can make PDFs with an arbitrary set of fonts
> (possibly embed them into the document). What would you suggest
John Henry wrote:
> Is there a more elagant way of doing this?
>
> # logflags is an array of logicals
> test=True
> for x in logflags:
>test = test and x
> print test
Py2.5:
test = all( logflags )
Py2.4 (although somewhat ugly):
try:
test = itertools.ifilterfalse( logflags ).next()
Kirt wrote:
> i have walked a directory and have written the foll xml document.
> one of the folder had "&" character so i replaced it by "&"
> #--test1.xml
>
> C:\Documents and Settings\Administrator\Desktop\1\bye
> w&y
>
> def.txt
> 200607130417
>
>
>
> C:\Docum
...
http://effbot.org/zone/element-iterparse.htm
http://codespeak.net/svn/lxml/trunk/doc/api.txt
Stefan
> Stefan Behnel wrote:
>> Kirt wrote:
>>> i have walked a directory and have written the foll xml document.
>>> one of the folder had "&" character so i
Diez B. Roggisch wrote:
> Or use PayPal and pay one of the guys here - my hourly fee is 50€, and
> less than one hour work can't be booked.
He!
Don't tell people in public that you're working at 50€/hour! That's gonna
destruct the market. It's better if they believe there's nothing below 80€,
the
bruce wrote:
> is there a bay area based guru, or someone who's into mentoring that i'we
> can talk to... specifically someone who's experienced using
> mechanize/browser/urllib/urllib2/cookies/etc...
>
> we're running into small situations that are taking an inordinate amount of
> time to resolve
Simon Brunning wrote:
> On 7/13/06, Stefan Behnel <[EMAIL PROTECTED]> wrote:
>> Maybe the right thing to ask back is: how much do you pay?
>
> And possibly; *which* bay? ;-)
What do you mean? Is there more than one Bayern?
http://en.wikipedia.org/wiki/Bayern
Stefan
--
h
Russell Warren wrote:
> How can you tell what objects support the buffer interface? Is
> anything visible at the python level, or do you need to dig into the C
> source?
At the C level, there is a function for testing:
int PyObject_CheckReadBuffer(PyObject* o)
http://docs.python.org/dev/api/abs
gmax2006 wrote:
> My RedHat Linux installation already has Python 2.3 on it.
> What is the easiest way to upgrade it to 2.4?
The source tar-ball contains an file Misc/RPM/python-XXX.spec that you can use
to build an RPM ("rpmbuild -bs" or "rpm -bs"). The resulting package will
normally be called "
[EMAIL PROTECTED] wrote:
> Submit your comments because I need them!
[loads of SPAM deleted]
As I infer from the type of your posting, what you *want* is a good placement
in Google, but what you really *need* is a good lawyer.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Justin Powell wrote:
> Hi, I'm looking for suggestions on how to accomplish something in python. If
> this is the wrong list for such things, I appologize and please disregard the
> rest.
No, this is totally the right place.
> My application needs to allow users to create scripts which will be
[EMAIL PROTECTED] wrote:
> Is there a TFTP client python module? I just need "get file" feature.
> I came across two implementations on WEB, but they are kind of
> unfinished (got the code from some mailing list!).
Second hit in Google ("tftp python"):
http://mail.python.org/pipermail/python-list
> Stefan Behnel [EMAIL PROTECTED] wrote:
>> [EMAIL PROTECTED] wrote:
>>> Is there a TFTP client python module? I just need "get file" feature.
>>> I came across two implementations on WEB, but they are kind of
>>> unfinished (got the code from some
cyberco wrote:
> Although the climate wouldn't make you think so, but searching for
> python is hot in Norway:
>
> http://www.google.com/trends?q=python&ctab=1&geo=all&date=all
>
> I wonder what the explanation could be.
>
> Btw: Java seems to be all the rage in India :)
> http://www.google.com/
[EMAIL PROTECTED] wrote:
> Where I'm struggling is figuring out what the index argument should
> be in the insert method. Using the example above
>
> # assume rootElement is the root of the input XML
> xList = rootElement.getiterator()
> idx = 0
> for x in xList:
> # mix of pseudo-code and
Rafal Zawadzki wrote:
> I was curious of performance new Python 2.4 "Simpler String Substitutions"
> so I decided to benchmark it. What I get
>
> [EMAIL PROTECTED]:~/python/benchmarks$ python template.py
> Normal python string substition = 0.017546 seconds
>PEP 292: Simpler String Sub
Avi Kak wrote:
> Does regular expression processing in Python allow for executable
> code to be embedded inside a regular expression?
>
> For example, in Perl the following two statements
>
> $regex = qr/hello(?{print "saw hello\n"})mello(?{print "saw
> mello\n"})/;
> "jellohellomello" =~ /$reg
Arash Partow wrote:
> I've ported various hash functions to python if anyone is interested:
> [snip]
Ok, so if you think they are useful, what about writing up an article for the
Python Cookbook that describes their usage and specific
advantages/disadvantages?
http://aspn.activestate.com/ASPN/Py
Kirt wrote:
> i have walked a directory and have written the foll xml document.
> one of the folder had "&" character so i replaced it by "&"
> #--test1.xml
>
> C:\Documents and Settings\Administrator\Desktop\1\bye
> w&y
> [...]
> #---
[EMAIL PROTECTED] wrote:
> Hi, I've found lots of material on the net about unicode html
> conversions, but still i'm having many problems converting unicode
> characters to html entities. Is there any available function to solve
> this issue?
> As an example I would like to do this kind of convers
Andy Dingley wrote:
> The purpose of range() in Python is as loop control,
No, the purpose of range() is to create a list, as the docs state.
http://docs.python.org/lib/built-in-funcs.html
"""
range(...) - This is a versatile function to create lists containing
arithmetic progressions.
"""
Stef
Simon Brunning wrote:
> On 19 Jul 2006 02:34:09 -0700, Simon Hibbs <[EMAIL PROTECTED]> wrote:
>> I was reading an article about the One Laptop Per Child initiative the
>> other day, and being a Python fan I wondered if there are any plans to
>> put Python on it, or at least make it available. A cut
Shan wrote:
> If i have a list of urls how can I extract or pull their respective xml
> feeds?
from lxml import etree
feeds = []
for url in my_url_list:
feeds.append( etree.parse(url) )
For the rest, find out about the ElementTree API.
Stefan
--
http://mail.python.org/mailma
Kay Schluehr wrote:
> What about letting your teammates editing certain data-structures in
> different files ( physical modules ) but using them in a uniform way
> and enable a single access point. If you have partial classes there is
> no reason why your team has to share a large file where they h
Anoop wrote:
> Can any one help me out with the various depricated string functions
> that is followed in Python.
>
> For example how will be string.lower depricated.
>
> As far as string.lower('PYTHON') is concerned it is depricated as
> 'PYTHON'.lower(). Both of them would return an output : >>
Gerhard Fiedler schrieb:
> On 2006-07-24 14:30:31, Brian Beck wrote:
>
>> Michael Yanowitz wrote:
>>>Maybe I am missing something, but from what I've seen,
>>> it is not possible to overload functions in Python. That
>>> is I can't have a
>>> def func1 (int1, string1):
>>>and a
>>> def
c00i90wn wrote:
> Hey, I'm having a problem with the xml.dom.minidom package, I want to
> generate a simple xml for storing configuration variables, for that
> purpose I've written the following code, but before pasting it I'll
> tell you what my problem is. On first write of the xml everything goe
[EMAIL PROTECTED] wrote:
> how can I get the number of byte of the string in python?
> with "len(string)", it doesn't work to get the size of the string in
> bytes if I have the unicode string but just the length. (it only works
> fine for ascii/latin1) In data structure, I have to store unicode
Diez B. Roggisch wrote
> Stefan Behnel wrote:
>
>> [EMAIL PROTECTED] wrote:
>>> how can I get the number of byte of the string in python?
>>> with "len(string)", it doesn't work to get the size of the string in
>>> bytes if I have the unico
Hi Steve,
[EMAIL PROTECTED] wrote:
> I am having some difficulty creating a regular expression for the
> following string situation in html. I want to find a table that has
> specific text in it and then extract the html just for that immediate
> table.
Any reason why you can't use a real HTML pa
Diez B. Roggisch wrote
> I wouldn't consider jython abandonware. It is under active development, and
> I'm using a 2.2 alpha successful for quite a while now - which usually
> serves my needs.
>
> The problem is/was that new-style classes were a major hurdle to take, and
> this now seems to be con
[EMAIL PROTECTED] wrote:
> I am involved in one project which tends to collect news
> information published on selected, known web sites inthe format of
> HTML, RSS, etc and sortlist them and create a bookmark on our website
> for the news content(we will use django for web development). Curren
Hi,
Chas Emerick wrote:
> I looked around for an ElementTree-specific mailing list, but found none
> -- my apologies if this is too broad a forum for this question.
The lxml mailing list is always happy to receive feedback, but it's fine to
ask here if it's not lxml specific.
> I've been using
Fredrik Lundh wrote:
> Stefan Behnel wrote:
>
>> If you want to copy part of of removed element back into the tree,
>> feel free to do so.
>
> and that can of course be done with a short helper function.
Oh, and obviously with a custom Element class in lxml that does th
Chas Emerick wrote:
> the delta between Elements and DOM-style elements leads to other issues.
> There's no doubt that the needed helpers are simple, but all things being
> equal, not having to carry them around anywhere we're doing DOM
> manipulations is a big plus.
>
> Because we're far from doi
krishnakant Mane wrote:
> I need to use python for a very mission critical project. may be I
> will also use zope.
> so I will like to know how far I can trust python for security in its
> absolute (platform independent ) sence?
> I mean running unwanted code at run-time etc.
If you want a secure
Hallo everyone,
I have the honour to announce the availability of lxml 1.0.
http://codespeak.net/lxml/
It's downloadable from cheeseshop:
http://cheeseshop.python.org/pypi/lxml
"""
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It provides
safe and convenient access to these
Kent Johnson wrote:
> Stefan Behnel wrote:
>> Hallo everyone,
>>
>> I have the honour to announce the availability of lxml 1.0.
>>
>> http://codespeak.net/lxml/
>>
>> It's downloadable from cheeseshop:
>> http://cheeseshop.python.org/pypi/lx
Fredrik Lundh wrote:
> Gary Robinson wrote:
>
>> We're using xml.sax.xmlreader in our app (http://www.goombah.com,
>> which is written in Python).
>>
>> In Python 2.3.x, does that use the C-language expat under the hood?
>
> yes.
>
>> The reason I'm asking is because we're wondering if we can sp
Hi Brian,
Brian Blais wrote:
> import module_py # import a function from a python module
> import module_pyrex # import a function from a pyrex extension module
>
> class This(object):
>
> def update1(self,val):
> print val
>
> def update2(self,val):
> print "2",va
Brian Blais wrote:
> Greg Ewing wrote:
>> Brian Blais wrote:
>>> I have found a very similar problem trying to replace a method using a
>>> function defined in pyrex.
>>
>> What *should* work is to define the method inside a
>> class in Pyrex (plain class, not extension type) and
>> extract it o
bruce wrote:
> in playing around with the test python app (see below) i've got a couple of
> basic questions. i can't seem to find the answers via google, and when i've
> looked in the libxml2dom stuff that i downloaded i didn't see answers
> either...
>
> for the list in the "for label in d.xpath
[EMAIL PROTECTED] wrote:
> bruce wrote:
>> is there anyone with XPath expertise here? i'm trying to figure out if
>> there's a way to use regex expressions with an xpath query? i've seen
>> references to the ability to use regex and xpath/xml, but i'm not sure how
>> to do it...
>>
>> i have a situ
[EMAIL PROTECTED] wrote:
> I have an XML file which contains entries of the form:
>
>
> 1
> 2
>
> 1
>
>
> Currently, I have written a SAX based handler that will read in all the
> entries and return a list of the contents of these
> entries. However this is not scalable and for my
w chun wrote:
> What: (Intense) Intro to Python
> When: August 16-18, 2006
> Where: San Francisco (SFO/San Bruno), CA, USA
Interesting! Now that you mention it, I remember wanting to organise an
extensive Python course in Bornhövede, Germany. However, there's only some 16
people living in the c
bruce wrote:
> for guys with python/xpath expertise..
>
> i'm playing with xpath.. and i'm trying to solve an issue...
>
> i have the following kind of situation where i'm trying to get certain data.
>
> i have a bunch of tr/td...
>
> i can create an xpath, that gets me all of the tr.. i only w
elmo wrote:
> Hello, after two days of failed efforts and googling, I thought I had
> better seek advice or observations from the experts. I would be grateful
> for any input.
>
> We have various small internal web applications that use utf-8 pages for
> storing, searching and retrieving user inpu
Srijit Kumar Bhadra wrote:
> I am new to lxml. I am interested to know the equivalent code using
> lxml (http://cheeseshop.python.org/pypi/lxml/1.1alpha). The code is
> taken from http://effbot.org/zone/xml-writer.htm
>
> from elementtree.SimpleXMLWriter import XMLWriter
> import sys
>
> w = XMLW
Laszlo Nagy wrote:
> I'm looking for a library that can do the following:
>
>* Parse a simple structured text file (XML or HTML etc.)
>* Render its output to an image
>* I would like to give the maximum width of the image (but not the
> minimum)
>* I would like to use my custo
c00i90wn wrote:
> Stefan Behnel wrote:
>> c00i90wn wrote:
>>> Hey, I'm having a problem with the xml.dom.minidom package, I want to
>>> generate a simple xml for storing configuration variables, for that
>>> purpose I've written the following code, b
Peter Møllerud wrote:
> I'm very new to Python
then you might want to consider using ElementTree or lxml, not necessarily
minidom.
> c = doc.createElement("sometest")
> doc.appendChild(c)
> tmp = doc.createElement("info")
> tmp.setAttribute("vehicle", "car")
> tmp.setAttribute("x-ray ", "100-1")
Jan Dries wrote:
> I'm trying to find Windows binaries for lxml. The cheeseshop is supposed
> to have such binaries, but I can't find them.
> Does anyone know where I might find such binaries?
http://cheeseshop.python.org/pypi/lxml
Sometimes takes a day longer, but our helpful egg contributors ar
Tim N. van der Leeuw wrote:
> Another option is Amara; also quite high-level and also allows for
> incremental parsing. I would say Amara is somewhat higher level than
> ElementTree since it allows you to access your XML nodes as Python
> objects (with some extra attributes and some minor warts), a
[EMAIL PROTECTED] wrote:
> ok i close this discussion
No, you don't.
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I need to do a quadratic optimization problem in python where the
> constraints are quadratic and objective function is linear.
>
> What are the possible choices to do this.
Too bad these homework assignments get trickier every time, isn't it?
Stefan
--
http://mail.py
[EMAIL PROTECTED] wrote:
> I'd like to use XSV for validating an XML file in Python.
> I am working on Linux Debian platform.
> I'm not sure how to install XSV and how to configure it. My goal is to
> be able to import the XSV library in Python and be able to use it's
> functions.
You can use "dpk
Ant wrote:
> So I thought I'd look into the pyparsing module, but can't find a
> simple example of processing random text.
Have you looked at the examples on the pyparsing web page?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> [EMAIL PROTECTED] wrote:
> Stefan Behnel wrote:
>> BTW: any reason you need to use XSV? There are some other libraries out there
>> that can validate XML based on XML Schema and RelaxNG, e.g. lxml. They are
>> much more powerful than XSV.
>
> No particular r
[EMAIL PROTECTED] wrote:
> Stefan Behnel wrote:
>>> [EMAIL PROTECTED] wrote:
>>> Stefan Behnel wrote:
>>>> BTW: any reason you need to use XSV? There are some other libraries out
>>>> there
>>>> that can validate XML based on XML Schema
Tor Erik Soenvisen wrote:
> (len(['']) is 1) == (len(['']) == 1) => True
>>> len([''])
1
>>> len(['']) is 1
True
>>> len(['']) == 1
True
>>> True == True
True
>>> (len(['']) is 1) == (len(['']) == 1)
True
What did you expect?
Stefan
--
http://mail.python.org/mailm
Jim Tittsler wrote:
> Is there a standard recipe for getting the subversion revision number
> into my Python-based application each time I package it up with
> distutils? (Not just the package name, but also a string that I will
> display in my app's "About" dialog.)
Here's how we do it in lxml:
Laszlo Nagy wrote:
>> - libxml : http://codespeak.net/lxml/
>>
> Probably this is what I need to use. (However, I see in the mailing
> lists that there are problems with this part of libxml2.)
XML Schema support in libxml2 is not complete. It should work in most cases,
but I've already stumbl
[EMAIL PROTECTED] wrote:
> I have created an example using libxml2 based in the code that appears
> in http://xmlsoft.org/python.html.
> My example processes an enough amount of html files to see that the
> memory consumption rises till the process ends (I check it with the
> 'top' command).
Try
[EMAIL PROTECTED] wrote:
> I'm looking for a module to load an SVG document so that I can read out
> its contents in some graphics-centric way. For example, path elements
> store their vertices in a long attribute string you need to parse. An
> ideal module would get me these vertices in a list.
>
Maxim Sloyko wrote:
> I have a little problem with XML namespaces.
> In my application I have two XML processors, that process the same
> document, one after the other. The first one looks for nodes in 'ns1'
> namespace, and substitutes them, according to some algorithm. After
> this processor is
Méta-MCI schrieb:
> The second way don't run:
>
> Traceback (most recent call last):
> File "C:\Program Files\OpenOffice.org 2.0\program\hello_world.py", line 1,
> in?
> import uno
> File "C:\Program Files\OpenOffice.org 2.0\program\uno.py", line 37, in ?
> import pyuno
> ImportError:
IamIan wrote:
> I have a very simple SAX script from which I get results like
> 'Title1:Description','Title2:Description'. I want to split each result
> on the colon, using the two resulting elements as key/value pairs in a
> dictionary. I've tried a couple different approaches with lists etc,
> bu
flebber wrote:
> I was working at creating a simple program that would read the content
> of a playlist file( in this case *.k3b") and write it out . the
> compressed "*.k3b" file has two file and the one I was trying to read
> was maindata.xml.
Consider using lxml. It reads in gzip compressed XML
flebber wrote:
> I was working at creating a simple program that would read the content
> of a playlist file( in this case *.k3b") and write it out . the
> compressed "*.k3b" file has two file and the one I was trying to read
> was maindata.xml
The k3b format is a ZIP archive. Use the zipfile libr
flebber wrote:
> Hi Can anyone show me a working example of how to use gzip to
> decompress a file. I have read the docs at python.org and had many
> goes at it but just can't get it to work.
According to your other post, you are trying to open a ZIP archive using gzip.
Use the zipfile module inst
geoffbache wrote:
> I have a Python program (on UNIX) whose main job is to listen on a
> socket, for which I use the SocketServer module. However, I would also
> like it to be sensitive to signals received, which it isn't if it's
> listening on the socket. ("signals can only be received between ato
Steven Bethard wrote:
> Rob Wolfe wrote:
>> Steven Bethard <[EMAIL PROTECTED]> writes:
>>> I'd hate to steer a potential new Python developer to a clumsier
>>
>> "clumsier"???
>> Try to parse this with your program:
>>
>> page2 = '''
>> URLs
>>
>>
>> http://domain1/page1";>som
Jackie wrote:
> I want to get the information of the professors (name,title) from the
> following link:
>
> "http://www.economics.utoronto.ca/index.php/index/person/faculty/";
That's even XHTML, no need to go through BeautifulSoup. Use lxml instead.
http://codespeak.net/lxml
> Ideally, I'd lik
[EMAIL PROTECTED] wrote:
> I work at this company and we are re-building our website: http://caslt.org/.
> The new website will be built by an external firm (I could do it
> myself, but since I'm just the summer student worker...). Anyways, to
> help them, they first asked me to copy all the text f
Jay Loden wrote:
> Someone else mentioned lxml but as I understand it lxml will only work if
> it's valid XHTML that they're working with.
No, it was meant as the OP requested. It even has a very good parser from
broken HTML.
http://codespeak.net/lxml/dev/parsing.html#parsing-html
Stefan
--
htt
501 - 600 of 1800 matches
Mail list logo