[python-win32] turning monitors off from Python?

2008-12-04 Thread Alec Bennett
I'm trying to turn a monitor off from a Python script. I can do this using the program wizmo, so its possible from Windows. I found this script which describes a method using SendMessage: http://fci-h.blogspot.com/2007/03/turn-off-your-monitor-via-code-c.html Translated to Python, here's what

Re: [python-win32] turning monitors off from Python?

2008-12-04 Thread Tim Golden
Alec Bennett wrote: I'm trying to turn a monitor off from a Python script. I can do this using the program wizmo, so its possible from Windows. I found this script which describes a method using SendMessage: http://fci-h.blogspot.com/2007/03/turn-off-your-monitor-via-code-c.html Translated

Re: [python-win32] Problem in accessing the Sender and Receiver addresses of an outlook mail

2008-12-04 Thread Tim Roberts
venu madhav wrote: I am using Exchange server and partial code is given below message = inbox.Messages.Item(11) objRecip = message.Recipients.Item(1) typ = objRecip.AddressEntry.Type print the type of address print typ Its output is

[python-win32] rebooting windows from Python?

2008-12-04 Thread Alec Bennett
I'm wondering if there's some way to reboot or shutdown Windows from within Python? I can log out like this: win32api.ExitWindowsEx(4) And according to the documentation, I should be able to shutdown like this: win32api.ExitWindowsEx(2) But that returns the following error: 'A required

Re: [python-win32] rebooting windows from Python?

2008-12-04 Thread Tim Roberts
Alec Bennett wrote: I'm wondering if there's some way to reboot or shutdown Windows from within Python? I can log out like this: win32api.ExitWindowsEx(4) And according to the documentation, I should be able to shutdown like this: win32api.ExitWindowsEx(2) But that returns the

Re: [python-win32] Walking the registry and creating reg files

2008-12-04 Thread Tim Roberts
Mike Driscoll wrote: We're doing what amounts to a registry session audit here at work, so I need to walk a specific set of subfolders in our registry and get the contents thereof. The subfolders will vary from user to user. I found Tim Golden's excellent registry walking script on his

Re: [python-win32] Walking the registry and creating reg files

2008-12-04 Thread Alec Bennett
Reg files are just text files, so why not just create the text files yourself? Here's a reg file for example: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Gizmoware\Whatever] Name=Yada Number=something --- On Thu, 12/4/08, Tim Roberts [EMAIL PROTECTED] wrote: From: Tim Roberts [EMAIL

Re: [python-win32] Walking the registry and creating reg files

2008-12-04 Thread Tim Roberts
Alec Bennett wrote: Reg files are just text files, so why not just create the text files yourself? Here's a reg file for example: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Gizmoware\Whatever] Name=Yada Number=something Because Mike said he needed to extract sections from the existing