problems with os.path.isdir on windows shares (i've read the FAQ)

T

todd smith

having some strange problems with Python2.3 on windowsXP. im trying
to access shares and the os.path.isdir function _always_ returns false
even though the directories are there and i can os.chdir, os.listdir it
in the python shell. i've followed the FAQs rule of putting the trailing '\\'
['ssbackup-16-1-2004.ssa', 'ssbackuptest-14-1-2004.ssa', 'tmp']
 
M

Michel Claveau/Hamster

Hi !

\\\\ren\\backup is perhaps no a directory, but the name of a shared
ressource.



@-salutations
 
T

todd smith

Michel Claveau/Hamster said:
Hi !

\\\\ren\\backup is perhaps no a directory, but the name of a shared
ressource.



@-salutations


i'm a bit confused as to what you mean by a shared resource. but
\\ren\backup is definately a shared directory, i mkdir'd it myself :)
 
R

Roger Upole

This used to work (1.5.2 maybe ?), and I got bit pretty bad when it stopped.
Had a small function to copy a file to either a full path or into a
directory,
as determined by os.path.isdir. After upgrading, the results weren't pretty
the
first time I tried to copy a file to a share.
I had to replace os.path.isdir(pathname) with
win32file.GetFileAttributes(pathname) & win32con.FILE_ATTRIBUTE_DIRECTORY
to get around it.
Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top