Re: emulating read and readline methods

2008-09-11 Thread MRAB
On Sep 11, 9:23 am, Sean Davis <[EMAIL PROTECTED]> wrote: > On Sep 10, 7:54 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > On Sep 11, 8:01 am, MRAB <[EMAIL PROTECTED]> wrote: > > > > On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > > > > > I have a large file that I would like to t

Re: emulating read and readline methods

2008-09-11 Thread Sean Davis
On Sep 10, 7:54 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Sep 11, 8:01 am, MRAB <[EMAIL PROTECTED]> wrote: > > > > > On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > > > > I have a large file that I would like to transform and then feed to a > > > function (psycopg2 copy_from) that

Re: emulating read and readline methods

2008-09-10 Thread John Machin
On Sep 11, 8:01 am, MRAB <[EMAIL PROTECTED]> wrote: > On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > > > I have a large file that I would like to transform and then feed to a > > function (psycopg2 copy_from) that expects a file-like object (needs > > read and readline methods). > > >

Re: emulating read and readline methods

2008-09-10 Thread MRAB
On Sep 10, 10:52 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Sean Davis schrieb: > > > > > I have a large file that I would like to transform and then feed to a > > function (psycopg2 copy_from) that expects a file-like object (needs > > read and readline methods). > > > I have a class like

Re: emulating read and readline methods

2008-09-10 Thread MRAB
On Sep 10, 6:59 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a large file that I would like to transform and then feed to a > function (psycopg2 copy_from) that expects a file-like object (needs > read and readline methods). > > I have a class like so: > > class GeneInfo(): >     def __init__

Re: emulating read and readline methods

2008-09-10 Thread Diez B. Roggisch
Sean Davis schrieb: I have a large file that I would like to transform and then feed to a function (psycopg2 copy_from) that expects a file-like object (needs read and readline methods). I have a class like so: class GeneInfo(): def __init__(self): #urllib.urlretrieve('ftp://ftp.ncb

emulating read and readline methods

2008-09-10 Thread Sean Davis
I have a large file that I would like to transform and then feed to a function (psycopg2 copy_from) that expects a file-like object (needs read and readline methods). I have a class like so: class GeneInfo(): def __init__(self): #urllib.urlretrieve('ftp://ftp.ncbi.nih.gov/gene/DATA/ g