There's likely a way to escape the backslash, but I just did a substitution.
testing inside the Python shell (omitting earlier steps):
>>>myDataDir = myDataDir.replace("\\", "/") # escape the backslash in the command
>>>os.chdir(myDataDir)
Easy, peasy.
Your solution works, too:
>>> myDataDir = "c:\\data\\00-LatestData"
>>> os.chdir(myDataDir)
>>> print os.getcwd()
c:\data\00-LatestData
>>>
There may even a 'os' method to give the 'myDataDir' already pre-escaped; no doubt this has come up before... But I learned some things with my adventures today, so it's all good.
Thanks.
Cheers,
Scott.