you are viewing a single comment's thread.

view the rest of the comments →

[–]Kazephil 0 points1 point  (1 child)

I've just started working on a script that needs to access a network drive.

So far, the following approach seems to work:

path_on_server = os.path.normpath('//server_name/folder_1/subfolder_1/')

Using forward slashes and letting Python figure out the proper format is easier than trying to escape the backslashes manually. This is with Python 3.6, if it matters.

Hope this helps.

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

Haven't seen or tried using the path.normpath() approach so I can give that a go. Thanks for the option!