From: Sean DiZazzo on

I have a small app that uses pywin32 to log on to a remote host and
send some files around. It works well, but I've found a machine that
the app won't work on.

The machine is dual-homed, with one interface able to see the server
machine, but the other can not. I don't have the exact error because
I can't currently get on to the machine where the app fails, but I am
told it is something like that "that server doesn't exist".

Could it be that it is trying to use the wrong interface? ie. The
interface on the wrong vlan? If so, is there a way to force the
connection to go to a specific interface? I'll post the exact error
after I can get on that machine. Thanks!


I'm using this wnet_connect() function that I found somewhere. It
works perfectly except on this one machine.

def wnet_connect(self, host, username, password):
unc = ''.join(['\\\\', host])
None, username, password)
except Exception, err:
if isinstance(err, win32wnet.error):
if err[0] == 1219:
win32wnet.WNetCancelConnection2(unc, 0, 0)
return wnet_connect(host, username, password)
raise err

From: Sean DiZazzo on
On Apr 14, 9:22 pm, Dennis Lee Bieber <wlfr...(a)> wrote:
> On Wed, 14 Apr 2010 15:18:11 -0700 (PDT), Sean DiZazzo
> <half.ital...(a)> declaimed the following in
> gmane.comp.python.general:
> >     def wnet_connect(self, host, username, password):
>         The presence of "self" in that parameter list implies this is a
> method defined inside a class.
> >                     return wnet_connect(host, username, password)
>         This recursive call is missing the instance reference...
>                                 return self.wnet_connect(...)

Wow. Good eye! To be honest, I'm not sure how that happened. I
guess it should have given me an error if it ever reached that block
though, right?

I'll take a close look at that tomorrow AM. Thanks!