%SystemDrive%

Bryan Olson fakeaddress at nowhere.org
Wed Feb 15 21:29:08 EST 2006


rtilley wrote:
> Carsten Haese wrote:
> 
>> Is there a reason why os.environ['SYSTEMDRIVE'] shouldn't work?
> 
> I didn't know it was in os! It returns C: instead of C:\ like my method. 
> Other than that, it seems to do the trick.

To get it with the \, you might use:

     os.path.abspath(os.environ['SYSTEMDRIVE'])


-- 
--Bryan



More information about the Python-list mailing list