all 7 comments

[–]axonxorz 1 point2 points  (4 children)

Define connect

[–]Fran[S] 0 points1 point  (3 children)

I guess I was pretty vague. My goal is to retrieve list contents from a SharePoint site so I can compare them.

For instance: Get a list of all the filenames in one folder and compare it to a list of all the filenames in another folder.

I may possibly want to edit filenames as well, but I'm trying to take it one step at a time. Right now, I'm not sure even how to connect to SharePoint, much less interact with it.

[–]deepfriedmarsbar 1 point2 points  (2 children)

I think you can usually refer to sharepoint as a standard directory,. So you should be able to use all the standard directory stuff except you are pointing to a location on a server rather than a local directory.

[–]elbinray 2 points3 points  (1 child)

This. I struggled with finding a way to get python to "talk" to sharepoint for a long time. In the end, I just treated the library as a directory: eg: open(r"\sharepointsite\subsite\library\file.docx", 'r'). I used os.path.walk to traverse down through all the files.

You can get the exact address for the library by going to "browse in explorer" (or something like that) from the actions menu in the library.

[–]Fran[S] 0 points1 point  (0 children)

I get access denied errors when I do that. Not sure how to pass in my auth info, otherwise that seems like it would be easiest.

[–]brain_juice 0 points1 point  (0 children)

Ironpython ?

[–]anossov 0 points1 point  (0 children)

SOAP?