On 8/16/07, frikk <fr*****@gmail.comwrote:
On Aug 16, 2:43 pm, "Chris Mellon" <arka...@gmail.comwrote:
On 8/16/07, frikk <frik...@gmail.comwrote:
I previously posted about accessing SharePoint over the web. Well I
have since given up any easy means of doing this, since something else
has perked my interest. Instead of going tohttp://sharepoint/site,
why not just access \\sharepoint\site\ directly?
So my question is this - How do I access that network share?
If I go to start -run, and type in "\\SharPointServer\Site\Folder",
windows explorer will pop up with it. I suppose I could have a little
batch script that python runs to map the drive to a local letter, like
J:, but this does not seem necessary.
Suggestions?
This does not work, for obvious reasons:
>import glob.glob
>glob.glob("\\\\server\\folder\\*")
[]
I don't see whats "obvious" about this. Access to windows shares is
handled by Windows in a VFS layer, and glob and all other Python file
access works fine over them for me.- Hide quoted text -
- Show quoted text -
Haha ok, you're right its not obvious. Sorry for that.
But that code does not work - should it?
Do you have an example of glob working over a file share, not a
network mapped drive?
import glob
glob.glob(r"\\localhost\c$\python25\libs\*")
['\\\\localhost\\c$\\python25\\libs\\bz2.lib',
'\\\\localhost\\c$\\python25\\libs\\libpython25.a' ,
'\\\\localhost\\c$\\python25\\libs\\pyexpat.lib',
'\\\\localhost\\c$\\python25\\libs\\python25.lib',
'\\\\localhost\\c$\\python25\\libs\\select.lib',
'\\\\localhost\\c$\\python25\\libs\\unicodedata.li b',
'\\\\localhost\\c$\\python25\\libs\\winsound.lib',
'\\\\localhost\\c$\\python25\\libs\\_bsddb.lib',
'\\\\localhost\\c$\\python25\\libs\\_ctypes.lib',
'\\\\localhost\\c$\\python25\\libs\\_ctypes_test.l ib',
'\\\\localhost\\c$\\python25\\libs\\_elementtree.l ib',
'\\\\localhost\\c$\\python25\\libs\\_hashlib.lib',
'\\\\localhost\\c$\\python25\\libs\\_msi.lib',
'\\\\localhost\\c$\\python25\\libs\\_socket.lib',
'\\\\localhost\\c$\\python25\\libs\\_sqlite3.lib',
'\\\\localhost\\c$\\python25\\libs\\_ssl.lib',
'\\\\localhost\\c$\\python25\\libs\\_testcapi.lib' ,
'\\\\localhost\\c$\\python25\\libs\\_tkinter.lib']
I do it all the time. I'd double check your slash escaping (consider
using r'') and pathnames.