[python-win32] Win32 Mode

Ray Pasco pascor at hotpop.com
Sat Nov 29 07:55:05 EST 2003


That's not what seems to be happening.  Here's the entire code:

    import win32api
    win32api.InitiateSystemShutdown ('', '', 0, 1, 1)

and this is the result:

    Traceback (most recent call last):
      File "try.py", line 9, in ?
        win32api.InitiateSystemShutdown ('', '', 0, 1, 1)
    pywintypes.error: (120, 'InitiateSystemShutdown', 'This function is 
only valid in Win32 mode.')

Hmmmm...

Mark Hammond wrote:

>It doesn't - you just import the modules, and away you go.  If the modules
>aren't installed, you get an ImportError you can handle any way you like.
>
>Mark.
>
>  
>
>>-----Original Message-----
>>From: python-win32-bounces at python.org
>>[mailto:python-win32-bounces at python.org]On Behalf Of Ray Pasco
>>Sent: Saturday, 29 November 2003 2:07 PM
>>To: python-win32 at python.org
>>Subject: [python-win32] Win32 Mode
>>
>>
>>How can a script be "put in" Win32 mode in order to use some of the
>>win32api calls ?
>>    
>>
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20031129/ce199b33/attachment.html


More information about the Python-win32 mailing list