Windows File Paths in Python
Windows file paths may contain backslashes, for example “C:\Data\file1.nex5”.
To use a path with the baskslashes in Python (for example, to open the file “C:\Data\file1.nex5”), you can either prepend the file path with r
doc = nex.OpenDocument(r"C:\Data\file1.nex5")
or replace single backslashes with double backslashes
doc = nex.OpenDocument("C:\\Data\\file1.nex5")
or replace single backslashes with forward slashes
doc = nex.OpenDocument("C:/Data/file1.nex5")