Re: How to get the previous line in a file?

2007-03-16 Thread dhn
On Mar 16, 5:10 pm, [EMAIL PROTECTED] wrote: > On Mar 16, 3:51 pm, Shane Geiger <[EMAIL PROTECTED]> wrote: > > > > > lines = open('/tmp/foo.py', > > "r").read().splitlines() > > > previous_line = > > '' > > > for line in > > lines: > > > if "foo" in > > line: > > > print "found foo in t

Point-feature labeling in matplotlib

2006-05-17 Thread dhn
I am trying to automate the generation of scatterplots in matplotlib. The problem of where to put the labels is known as 'point-feature labeling' (a main application is in cartography, where cities and such are known as 'point features'). In general the problem is not easy. Some references: http:/