Re: [python-win32] OE/WAB help with VB ...

2008-03-11 Thread Clinton Lee Taylor
Greetings ... Thanks again for the quick response ... Clinton Lee Taylor wrote: I think I get this because com objects have to be imported ... But this ActiveX object does not seem to have a type lib? ... It appears the type info is embedded in the dll itself, rather than shipped as

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
hi: snip Not that it's necessarily wrong, but it's not clear why you're bothering to pull server information from each client separately. It's not as though the services running on Server S1 will appear different when queried from client C1 and C2. But maybe there's something I'm missing.

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: hi: i am new to python and wish but am writing a program as both a learning experience and which may even get used if it is any good. Welcome to the wonderful world of Python :) purpose of this program: is to retrieve and store (for historical purposes) system-info for

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: sorry - client as in customer Ah. I see. (Didn't think of that :) i will try and explain better, but its not quite clear in my mind what is achievable ... so to build up these database tables, i have to have some queries happening of the form : for list in

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
Hi Tim: So what you are saying is that it would be perfectly acceptable to have a for loop for each Win32_* query and that there is no good way to generalise that behaviour. eg. class Process() ... class Product() ... class Event() ... class Service() if __name__ == '__main__':

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
Hi Tim: Thanks, that was what I was after, but maybe you are right a couple of extra for loops is not looking too bad after all. Cheers Mark On 11/03/2008, Tim Golden [EMAIL PROTECTED] wrote: Tim Golden wrote: [... snip Elixir-based solution ...] I realise, rereading my post that it

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread Tim Golden
mark.a.brand wrote: Hi Tim: Thanks, that was what I was after, but maybe you are right a couple of extra for loops is not looking too bad after all. The code looks a little scary at first sight but it's not that bad ;) It's one of those things everyone learns to weigh up when they're

Re: [python-win32] advice on architecting or program design in python:

2008-03-11 Thread mark.a.brand
snip Python is that refactoring is usually really easy. /snip thats a good thing to know. i was originally going to just start out the naive way and refactor as python became more familiar. i think that approach may work best for me - take baby steps and refactor as i my knowledge and

Re: [python-win32] embedding IPython in a windows dll

2008-03-11 Thread mani sabri
-Original Message- From: [EMAIL PROTECTED] [mailto:python-win32- [EMAIL PROTECTED] On Behalf Of Tim Roberts mani sabri wrote: I want to run a Python shell from a DllMain() function. It isn't safe to do this much processing in a DllMain. There is a thing called the loader lock that

Re: [python-win32] How to create a com_record?

2008-03-11 Thread Kevin Patterson
Old thread, but I got a little more data on the function. The function actually has a REFIID as the first parameter. This apparently is a standard structure for C COM code. I'm not entirely sure why the win32com changes the REFIID to be a VT_RECORD. Does the following definition of the functions

[python-win32] win32gui.EnumWindows, documentation?

2008-03-11 Thread Julius
Hi, im new to python in generell and was wondering where i would find the api to win32gui.EnumWindows? I know one of its arguments is a callback function, but i cant find any information how it should look like? Is this another win32 python implementation or is the site just called activestate?

Re: [python-win32] win32gui.EnumWindows, documentation?

2008-03-11 Thread Rickey, Kyle W
I like using lambda for this, but you could also put it into a function. windows = [] win32gui.EnumWindows(lambda hwnd, resultList: resultList.append(hwnd), windows) This will populate windows with all the hwnds. -Kyle Rickey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [python-win32] win32gui.EnumWindows, documentation?

2008-03-11 Thread Julius
My fault(already got that one running), i meant the win32gui.EnumChildWindows(currentHwnd, windowEnumerationHandler, childWindows) function. from what i understand the purpose of this function is to return the childwindows from a top window - if this is right why not just pass a topwindow as

Re: [python-win32] win32gui.EnumWindows, documentation?

2008-03-11 Thread Tim Roberts
Julius wrote: My fault(already got that one running), i meant the win32gui.EnumChildWindows(currentHwnd, windowEnumerationHandler, childWindows) function. from what i understand the purpose of this function is to return the childwindows from a top window - if this is right why not just

Re: [python-win32] win32gui.EnumWindows, documentation?

2008-03-11 Thread Tim Golden
Julius wrote: Hi, im new to python in generell and was wondering where i would find the api to win32gui.EnumWindows? I know one of its arguments is a callback function, but i cant find any information how it should look like? Is this another win32 python implementation or is the site

Re: [python-win32] How to create a com_record?

2008-03-11 Thread Kevin Patterson
I found the comtypes equivalent if that helps any. The generated comtypes file looks like this: COMMETHOD([dispid(1610743812), helpstring(u'GetInterface() method')], HRESULT, 'GetInterface', ( ['in'], POINTER(GUID), 'riid' ), ( ['retval', 'out'],