[python-win32] win32ras.dial
Tim Golden
tim.golden at viacom-outdoor.co.uk
Thu Jul 29 08:08:13 CEST 2004
[fmml at cedval.org]
| 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?
Just to reassure you, I've recently used Python to save
our (and our customer's) bacon by maintaining a dial-up
from some high-profile advertising sites here in London.
So it definitely works. The important code fragment is:
<code>
def connect (ras_entry_name, username, password):
return win32ras.Dial (
None,
None,
(ras_entry_name, "", "", username, password, ""),
None
)
</code>
[fmml at cedval.org]
| handle = win32ras.Dial(None, None, ("my_local_isp",), None)
Now it's not clear from your code whether the "my_local_isp" in
your third parameter is the name of a dial-up entry. Assuming it
is, are the username/password stored against the entry? Try
adding them in explicitly. I'm a little surprised that the
function doesn't throw you out for passing the wrong number of
entries in the RASDIALPARAMS tuple. Try specifying them all as
in my example above.
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-win32
mailing list