On Thu, Mar 6, 2008 at 2:42 AM, Tim Golden <<a href="mailto:mail@timgolden.me.uk">mail@timgolden.me.uk</a>> wrote:<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<fishing advice><br>
First thing to do when asking "How do I do X in Python under Windows?"<br>
is to stick -- python X -- into Google and you get, eg:<br>
<br>
<a href="http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/PyWin32/win32api__GetSystemDirectory_meth.html" target="_blank">http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/PyWin32/win32api__GetSystemDirectory_meth.html</a><br>

<br>
which suggests that the win32api module from the pywin32 modules has<br>
the function you need.<br>
</fishing advice><br>
<br>
And sure enough...<br>
<br>
<dump><br>
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit<br>
(Intel)] on win32<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
 >>> import win32api<br>
 >>> win32api.GetSystemDirectory ()<br>
'C:\\WINDOWS\\system32'<br>
 >>><br>
</dump><br>
<br>
TJG<br>
</blockquote></div><br>I was aiming to figure out if the standard modules shipped with Python could do this already before I started using 3rd party libraries. Thanks.<br>