[python-win32] win32ras.dial

fmml at cedval.org fmml at cedval.org
Wed Jul 28 20:35:16 CEST 2004


Hi all,

I need to have a window machine, to periodically transfer a file over the
internet. The Net connection is by modem.

When trying the code below, the script initiate a call, but seem to close
the connection right after.  Does anybody have example code of using
win32ras.dial?


import win32ras, ftplib, os

handle = win32ras.Dial(None, None, ("my_local_isp",), None)

os.chdir('/temp')
ftp = ftplib.FTP("myftpserver.mydomain.org")
ftp.login("myftp", "myftp")
filename = 'fmtest.txt'
ftp.storlines("STOR " + filename, open(filename))

win32ras.HangUp()


Regards,

Francois


More information about the Python-win32 mailing list