GIS Shape file upload FTP server

Ahmed, Shakir shahmed at sfwmd.gov
Thu Mar 1 17:32:44 CET 2007


HI Group,

 

As I am very new in python field so this question might be very silly
but If I get any help that is highly appreciated.

 

Problem: 

 

I have a python script which is working fine to upload files to the ftp
server but the problem is it is reducing the actual size after
transferring. I need to upload a GIS Shape file to the ftp server but
want to keep the same size and format. Any idea or help is highly
appreciated.

 

Thanks

Shakir

Staff Geographer

Sfwmd.gov

 

The code is as follows: 

 

 

# Import system modules

 

import os

import sys 

import win32com.client

import zipfile

import os.path

import ftplib

from ftplib import FTP

 

 

ftp=ftplib.FTP("ftp.sfwmd.gov","","")  

ftp.login('sahmed','sa1lf1sh')

#ftp.cwd("/export/pub/sahmed")

 

ffile = open('c:\\test\\wuppnt.shp', 'r')

 

ftp.storbinary("stor wuppnt.shp", ffile)

ffile.close()

 

print "OK"

ftp.quit()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070301/e6e6a49b/attachment.html>


More information about the Python-list mailing list