Search the web
Sign In
New User? Sign Up
python-list · Python List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
win32com (VBScript to Python) problem   Message List  
Reply | Forward Message #122063 of 122067 |
Re: win32com (VBScript to Python) problem

In message <bpvho4$kon$1@...>
"Michel Claveau" <No.Spam.mc@...> wrote:

> import win32com.client
> WMIService =
> win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate,(Shutdo
> wn)}!\\CPU01\root\cimv2")
>
> objs = WMIService.ExecQuery(r"Select * from Win32_OperatingSystem")
> for obj in objs:
> obj.Reboot()



This gives me the same error 'int' is not callable.

Maybe it's something to do with late/early binding ??

What version of Python/win32all have you used this on ?

--
___
|im ---- ARM Powered ----
--
http://mail.python.org/mailman/listinfo/python-list



Tue Nov 25, 2003 7:58 pm

tim@...
Send Email Send Email

Forward
Message #122063 of 122067 |
Expand Messages Author Sort by Date

I'm (very non expert) trying to use a snippet of VBScript (to shut down Windows workstations) converted to Python but have hit a problem. The VBScript below...
Tim Howarth
tim@...
Send Email
Nov 25, 2003
11:22 am

Not knowing exactly what you want to do, just a question. Why use COM, shutdown is an exe so why not just execute it? Rony "Tim Howarth"...
Rony Steelandt
bucodi@...
Send Email
Nov 25, 2003
11:27 am

In message <bpve3m$shg$1@...> ... Using this method you can shutdown and poweroff (the 12 value) a machine, shutdown.exe from the reskit...
Tim Howarth
tim@...
Send Email
Nov 25, 2003
11:42 am

Hi ! This code "reboot" the computer 'CPU01' (if rights are OK) : import win32com.client WMIService = ...
Michel Claveau/Hamster
No.Spam.mc@...
Send Email
Nov 25, 2003
12:28 pm

Hi ! This code "reboot" the computer 'CPU01' (if rights are OK) : import win32com.client WMIService = ...
Michel Claveau/Hamster
No.Spam.mc@...
Send Email
Nov 25, 2003
12:30 pm

Hi ! This code "reboot" the computer 'CPU01' (if rights are OK) : import win32com.client WMIService = ...
Michel Claveau
No.Spam.mc@...
Send Email
Nov 25, 2003
12:35 pm

Tim Howarth <tim@...> wrote in ... This isn't a Python solution at all, but have you looked at PsTools (http://www.sysinternals.com)? It...
Duncan Booth
duncan@...
Send Email
Nov 25, 2003
12:42 pm

Sorry for the multi-post, my FAI is too much lazy... -- http://mail.python.org/mailman/listinfo/python-list...
Michel Claveau/Hamster
No.Spam.mc@...
Send Email
Nov 25, 2003
12:49 pm

... [... snip VB script culminating in obj.Win32shutdown 12 ...] ... [... snip Python translation of same ...] I'm not going to attempt to describe what you...
Tim Golden
tim.golden@...
Send Email
Nov 25, 2003
12:57 pm

In message <Xns943E7EB585A78duncanrcpcouk@...> ... Yes, very handy tools. It's just that I'd like to do the shutting down myself - why call pshutdown if...
Tim Howarth
tim@...
Send Email
Nov 25, 2003
1:06 pm

In message <bpvho4$kon$1@...> ... This gives me the same error 'int' is not callable. Maybe it's something to do with late/early binding...
Tim Howarth
tim@...
Send Email
Nov 25, 2003
1:10 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help