ftp return format

Richard Chamberlain richard_chamberlain at ntlworld.com
Fri May 5 13:58:11 CEST 2000


Hi,

Although its not directly a Python question, I know you guys are probably
nice enough to answer it anyway ;)

At work we run ftp to get files off an AS400 into a text file. These then
get imported into Excel to mess around with.

I would like to be able to use Python's ftplib to get the file and then use
COM to import straight into Excel.

The problem is then when I use ftplib I get the data back in a certain
format, I've also used the dos ftp command and I get the data the same way.

We use a thing called Rumba FileTransfer which is obviously translating
somehow, anyone know how I can do the same?

e.g.

from python:

0183
0000100000000000000000000000000000000000K0000000000000K
0184
0000300000013200000000000000000000000000000000013200000
0185
0000300001185200000000000000006M0000000000000118520006M

from Rumba:

0183                               1            0         0
0        -2         0    -2
0184                               3        132         0        0        0
132     0
0185                               3    11852         0    -64        0
11852   -64


I realise that it's fix delimited, but then I get stuck on the K and M which
crop up with negative numbers.


Thanks,


Richard





More information about the Python-list mailing list