On Windows 7 I fire up my IDLE Python 2.7.5 Shell:
>>> import os
>>> os.getcwd()
'C:\\Python27'
>>> os.path.relpath('C:\\')
'..'
>>> os.path.relpath('C:')
'.'
>>> os.chdir('C:')
>>> os.getcwd()
'C:\\Python27'
What is going on, and why does it have to be this complicated?