Skip to content

Commit

Permalink
checked in Peter Slicker's patches for speeding up BLAST parser
Browse files Browse the repository at this point in the history
under Python 2.3
  • Loading branch information
jchang committed Aug 31, 2003
1 parent c161d5e commit e1a31f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Bio/File.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ def __init__(self, handle):
self._saved = []

def readlines(self, *args, **keywds):
lines = self._saved + apply(self._handle.readlines, args, keywds)
#lines = self._saved + apply(self._handle.readlines, args, keywds)
lines = self._saved + self._handle.readlines(*args,**keywds)
self._saved = []
return lines

def readline(self, *args, **keywds):
if self._saved:
line = self._saved.pop(0)
else:
line = apply(self._handle.readline, args, keywds)
#line = apply(self._handle.readline, args, keywds)
line = self._handle.readline(*args,**keywds)
return line

def read(self, size=-1):
Expand Down Expand Up @@ -80,7 +82,8 @@ def tell(self):

def seek(self, *args):
self._saved = []
apply(self._handle.seek, args)
##apply(self._handle.seek, args)
self._handle.seek(*args)

def __getattr__(self, attr):
return getattr(self._handle, attr)
Expand Down
1 change: 1 addition & 0 deletions CONTRIB
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Katharine Lindner <katel@worldpath.net>
Tarjei Mikkelsen <tarjei@genome.wi.mit.edu>
Mike Poidinger <Michael.Poidinger@eBioinformatics.com>
Wolfgang Schueler <wolfgang@proceryon.at>
Peter Slickers <piet@clondiag.com>
Thomas Sicheritz-Ponten <thomas@cbs.dtu.dk>
Thomas Rosleff Soerensen <rosleff@mpiz-koeln.mpg.de>
Johann Visagie <wjv@cityip.co.za>
Expand Down

0 comments on commit e1a31f2

Please sign in to comment.