> > category = m.group(1)
> > >
> > > Traceback (most recent call last):
> > > File "", line 1, in ?
> > > AttributeError: 'NoneType' object has no attribute 'group'
> >
> > In this case the match failed, so m is None and m.group(1) gives an
> >error.
>
> So my problem is in the actual regex?
> > > I also found that on some of the strings I want to extract, when
> > > python reads them using file.read(), there are newline characters
> > > and other stuff that doesn`t show up in the actual html source.
> >
> > Not certain that I understand what you mean there. Can you show us?
> > read(
> Do you know of any Tutor-like list for Java you could recommend? I've
> been looking and I've been unable to find any... and i miss it :-)
Hi Guillermo,
The Java community uses a lot of web forums. Your best bet is probably
one of the 'Fundamentals' forums in:
http://forum.java.sun.com/i
[snip]
Paul Kraus wrote:
> Now I have to find a way to take the output at the end and pipe it
> out to an external Perl program that creates an excel spreadsheet (
> no real clean easy way to do this in python but hey each tool has its
> usefullness). I wish I could hide this in the object though
Kent Johnson wrote:
> >
> import re
> file = open("file1.html")
> data = file.read()
> catRe = re.compile(r'Title:(.*?)')
>
> Thi regex does not agree with the data you originally posted. Your
> original data was
> Category:Category1
>
> Do you see the difference? Your regex has
> From: Danny Yoo <[EMAIL PROTECTED]>
>
[...]
> The Regular Expression HOWTO itself is pretty good and talks about some of
> the stuff you've been running into, so here's a link to the base url that
> you may want to look at:
>
> http://www.amk.ca/python/howto/regex/
Ah yes I`ve been readin
> That is the approach Paul took originally (see the other fork of this
> thread). He is accumulating a sparse 3d matrix where the keys are year,
> field6 and month. (He hasn't said what field6 represents.) The problem
> is that he wants to print out counts corresponding to all the existing
> year
Oswaldo Martinez wrote:
> OK before I got in to the loop in the script I decided to try first with one
> file and I have some doubts with the some parts in the script,plus I got an
> error:
>
>
import re
file = open("file1.html")
data = file.read()
catRe = re.compile(r'Title:(.*?)
Hi,
After python I have to start learning Java.
Do you know of any Tutor-like list for Java you could recommend? I've
been looking and I've been unable to find any... and i miss it :-)
Thanks,
Guille
___
Tutor maillist - Tutor@python.org
http://ma
Danny Yoo wrote:
> This being said, what data are you modeling? It almost sounds like you're
> implementing some kind of 3d matrix, even a sparse one. More information
> about the data you're modelling might lead to a different representation
>
> For example, would using a dictionary whose keys
10 matches
Mail list logo