I am trying to map a virtual drive on my windows setup one of the tools I am using does not like the spaces in the filenames.
On the command line, I would do the following
subst l: "c:\Program Files\Complier\version 6.0\bin"
I tried to replicate the functionality in Python without any success. I started using os.execl()
to execute the subst
command directly, but that reported an invalid parameter error.
Some of the other solutions on SO suggest using the Win32API directly.
By the way, I am using Python 2.7.3 on Windows.
You can call the Windows API directly. Note that you need to pass unicode strings here, or you could set argtypes on the function to get type-safe behaviour.