[python-win32] Win32 Mode

Bob Gailer bgailer at alum.rpi.edu
Mon Dec 1 15:14:25 EST 2003


At 05:55 AM 11/29/2003, Ray Pasco wrote:

>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.')

Doing this on Win 2003 Server, logged on as administrator, yields:

 >>> win32api.InitiateSystemShutdown ('', '', 0, 1, 1)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
pywintypes.error: (5, 'InitiateSystemShutdown', 'Access is denied.')

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625 home
720 938 2625 cell 
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003


More information about the Python-win32 mailing list