[Tfug] python ftplib ports

Jim Secan jim at nwra.com
Fri Sep 26 08:55:50 MST 2008


Back to computers.  Has anyone figured out a way to constrain the range of
ports used by the python ftplib.py library in data transfer?  I'm running
into a problem wherein port 1025 is selected by whatever process sets the
port to be used in the data transfer (I'm running in active mode) and the
server rejects it.  I want to constrain the transfer to the upper reaches
of port space.  I don't see that there's any interface on the ftplib
library to accomplish this, and mucking about in the ftplib.py code tells
me that I don't understand what it's doing well enough to modify it.  (I'm
also trying to sort out why the server rejected port 1025, but I suspect
it's going something else assigned to that port.)

TIA
Jim
*---------------------*-------------------------------*
| Jim Secan           | Northwest Research Assoc, Inc |
| (jim at nwra.com)      | 2455 E. Speedway, Suite 204   |
| (520) 319-7773      | Tucson, Arizona 85719         |
*---------------------*-------------------------------*




More information about the tfug mailing list