system32 directory

Robert Dailey rcdailey at gmail.com
Thu Mar 6 16:15:17 EST 2008


On Thu, Mar 6, 2008 at 2:42 AM, Tim Golden <mail at timgolden.me.uk> wrote:
>
> <fishing advice>
> First thing to do when asking "How do I do X in Python under Windows?"
> is to stick -- python X -- into Google and you get, eg:
>
>
> http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/PyWin32/win32api__GetSystemDirectory_meth.html
>
> which suggests that the win32api module from the pywin32 modules has
> the function you need.
> </fishing advice>
>
> And sure enough...
>
> <dump>
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import win32api
>  >>> win32api.GetSystemDirectory ()
> 'C:\\WINDOWS\\system32'
>  >>>
> </dump>
>
> TJG
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080306/b67e61c1/attachment.html>


More information about the Python-list mailing list