andy wrote:
Hi people
I'm using beautiful soup to rip the uk headlines from the uk bbc page.
This works rather well but there is the problem of html entities which
appear in the xml feed.
Is there an elegant/simple way to convert them into the "standard"
output? By this I mean £ going to  ? or
Matthew Matson wrote:
Hi Tutors,
I am looking for the proper approach regarding the analysis of a
dictionary of combinations I have.
What I need to do is read from a supplied text file that has a unique ID
and that unique ID's associated combination of elements. So let's say I
have the fol
Vikram K wrote:
Suppose i have this nested list:
>>> x
[['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]]
>>> for i in x:
... print i
...
['NM100', 3, 4, 5, 6, 7]
['NM100', 10, 11, 12, 13]
['NM200', 15, 16, 17]
>>>
how do i obtain from the above the following nest
Alex Hall wrote:
Hi, once again...
I have a regexp that I am trying to use to make sure a line matches the format:
[c*]n [c*]n n
where c* is (optionally) 0 or more non-numeric characters and n is any
numeric character. The spacing should not matter. These should pass:
v1 v2 5
2 someword7 3
whi
with coffee:
yes = """
v1 v2 5
2 someword7 3
""".splitlines()[1:]
no = """
word 2 3
1 2
""".splitlines()[1:]
import re
pattern = "(\w*\d\s+?)(\w*\d\s+?)(\d)$"
rx = re.compile(pattern)
for line in yes:
m = rx.match(line)
assert m
print([part.rstrip() for part in m.groups()])
f
David Kim wrote:
Hello all,
I've finally gotten around to my 'learn how to parse html' project. For
those of you looking for examples (like me!), hopefully it will show you
one potentially thickheaded way to do it.
[...]
The code can be found at pastebin:
http://financialpython.pastebin.com
ad...@gg-lab.net wrote:
The "google" directoy has an empty __init__.py file (well, if we want
to be completely correct it contains some commented -#- lines). Same
for "appengine", "net" and "pyglib". As they all have an __init__.py
file, they should be consiedered as modules from the python
inter
Stephen Nelson-Smith wrote:
Hi,
Any advice or experiences?
go here and download the pdf!
http://www.dabeaz.com/generators-uk/
Someone posted this the other day, and I went and read through it and played
around a bit and it's exactly what you're looking for - plus it has one vs.
slid
Shashwat Anand wrote:
> How to find all possible integer co-ordinates lying on a circle of
given radius 'r'.
> If given the upper bound of 'r', I want to calculate all given
co-ordinates lying for 0 <= r <= n
>
> Let's say the upper bound of radius is 5
> All possible results are:
> radius 'r'
Albert-Jan Roskam wrote:
Hi,
I have an elementtree question that probably reflects my inexperience
with xml processing (and/or with Python). The xml file is a stream of
the Spss Clementine program. Each stream consists of, among others,
nodes. Each nodes has properties, among which "tooltipt
Garry Bettle wrote:
Howdy all,
I hope this message finds you all well.
I have a list that I output in the following order:
2010-01-07 1103 Sund A7 450m
2010-01-07 Sheff A7 500m
2010-01-07 1119 Sund A6 450m
2010-01-07 1128 Sheff A6 500m
2010-01-07 1134 Sund A5 450m
2010-01-07 1142 Sheff A7
11 matches
Mail list logo