[Tutor] Alternative File I/O for Tuples (fwd)

Don Parris webdev at matheteuo.org
Tue Jun 28 07:16:54 CEST 2005

On Sun, 26 Jun 2005 16:32:08 -0400
Kent Johnson <kent37 at tds.net> wrote:

> > From: Don Parris <webdev at matheteuo.org>
> > To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
> > Subject: Re: [Tutor] Alternative File I/O for Tuples
> > 
> > I guess I'm asking two closely-related questions:
> > (1) how to format the file so it can be readable, and
> If you like the recipe I posted, this could be as simple as 
> mbrPhone = open('mbrPhone.txt', 'w')
> mbrPhone.write(indent(...appropriate args to indent...))
> mbrPhone.close()
> Kent
> _______________________________________________

I tried this also:

    print 'Phone List'
    for rows in Results:        
        mbrPhone = open('mbrPhone.txt', 'w')
        mbrPhone.write(indent(rows, hasHeader=False, separateRows=False,
                              prefix='| ', postfix=' |'))

I suspect this is closer to what I need to use.  I still get a non-sequence
error on the traceback, though.

evangelinux    GNU Evangelist
http://matheteuo.org/                   http://chaddb.sourceforge.net/
"Free software is like God's love - you can share it with anyone anytime

More information about the Tutor mailing list