473,379 Members | 1,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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

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 '\\'
on the share name with no luck

heres my sessioin:
os.path.isdir('\\\\ren\\backup\\') False os.chdir('\\\\ren\\backup\\')
os.getcwd() '\\\\ren\\backup' os.listdir(os.getcwd())

['ssbackup-16-1-2004.ssa', 'ssbackuptest-14-1-2004.ssa', 'tmp']
Jul 18 '05 #1
3 2447
Hi !

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

@-salutations
--
Michel Claveau
Jul 18 '05 #2
"Michel Claveau/Hamster" <No********@No.Spam.mclaveau.No.Spam.com> wrote in message news:<bu**********@news-reader2.wanadoo.fr>...
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 :)
Jul 18 '05 #3
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

"todd smith" <to*******@yahoo.com> wrote in message
news:44*************************@posting.google.co m...
"Michel Claveau/Hamster" <No********@No.Spam.mclaveau.No.Spam.com> wrote

in message news:<bu**********@news-reader2.wanadoo.fr>...
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 :)

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Beman Dawes | last post by:
The docs for os.path.exists(), isdir(), and the like, do not describe behavior when an I/O error occurs. Testing on Windows XP SP2 with Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32, on a...
7
by: Grant | last post by:
Ok I have XP Pro and recently upgraded to SP2 but after doing so one of my favorite webpages to check daily does not respond the same as before. It used to be (pre SP2) that I could when visiting...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
13
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
17
by: chris.atlee | last post by:
Hi there, I haven't seen this topic pop up in a while, so I thought I'd raise it again... What is the status of the path module/class PEP? Did somebody start writing one, or did it die? I...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
11
by: Daz | last post by:
Would anyone know of a way to check whether or not a particular path is a directory? If I have to go down the route of using _findfirst and _findnext (windows specific), then so be it. However, I...
7
by: Patrick.O.Ige | last post by:
I moved web apps to Win2003. I have given read/write access rights to machinename/IIS_WPG but still getting the error "Access to the path "c:\inetpub\wwwroot\myApp" is denied. " Also gave...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.