i have problem with glob.glob() in remotely directory

Tim Roberts timr at probo.com
Sun Mar 1 06:24:29 CET 2009


lameck kassana <chelaskk at gmail.com> wrote:
>
>i did try but still not working.But also i try  os.walk() for remote
>computer like  os.walk('\\192.168.0.45') it also failed>

Of course it did, for two different reasons.  First, you can't just walk an
IP address.  You have to specify one of the shares that the machine
exposes.  Second, you STILL have a backslash problem.

If that machine has a network share called "files", you could say
    os.walk( '\\\\192.168.0.45\\files' )
or
    os.walk( r'\\192.168.0.45\files' )

>Thats it is my main problem do i need any new imports besides import os

No.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list