Joining data from three different files to be written into three Columns

Dawn Abbott whiterabbott at gmail.com
Sat Dec 2 17:49:16 EST 2006


On 11/29/06, Dawn Abbott <whiterabbott at gmail.com> wrote:
>
> I have three files of binary data.  I want to write the three binary data
> files to one file.  I want the old files to each have their own column in
> the new file.  This is what I have,
>
> f=open('relative_x.INT32','rb')
> a=array('l')
> a.fromfile(f,10)
> g=open('relative_y.INT32','rb')
> b=array('l')
> b.fromfile(g,10)
> data=zip(a,b)
> for datum in data:
> ...    print ' '.join(datum)
> ...
>
>
> the error I get is expected string, found int
> I figure that the joint is for strings only does anyone know of a way were
> I could join the data that would be for ints.
> Thanks
> Dawn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061202/9beb28a3/attachment.html>


More information about the Python-list mailing list