RE: [python-win32] Problem building pywin32

2004-12-15 Thread Mark Hammond
I'm trying to build pywin32, and would like to know how to specify an override for the include directories. It's finding shlobj.h here: C:\Program Files\Microsoft SDK\include\shlobj.h But I want it to use the one here: C:\Program Files\Microsoft Visual Studio .NET

RE: [python-win32] ActiveX components with Events

2004-12-15 Thread Mark Hammond
However, I have a problem that one of the methods on the ActiveX should show a UI and fire an event. The python code doesn't show the UI and no events get fired. This does the same thing in VB uncles I wait in a polling loop for my call to the ActiveX component and use the ubiquitous

RE: [python-win32] makepy problem with Win XP and Word 2000

2005-03-09 Thread Mark Hammond
To: python-win32@python.org Subject: [python-win32] makepy problem with Win XP and Word 2000 Hello everyone, My problem: Thanks to the absolutely fabulous win32com package by Mark Hammond, I have been using Python for MS Word automation for a long time. My script was working perfectly until

RE: [python-win32] win32com.Dispatch() vswin32com.client.gencache.EnsureDispatch() vswin32com.client.DispatchWithEvents()

2005-03-22 Thread Mark Hammond
What I would like to know is- is DispatchWithEvents() like the unreliable Dispatch(), or is it more like using EnsureDispatch() + event handling ? DispatchWithEvents is more like EnsureDispatch - it requires the makepy early-binding. Does anyone have some example sof using

RE: [python-win32] Pb with COM server on rc2 ?

2005-03-27 Thread Mark Hammond
My english is 0.0 beta-version. Sorry. Then I write the next with easy words. No problem. I have a strange problem (yerterday today), with COM server write with Python/Pywin The COM-server for test is simple : only one method, who return a string. The problem : With 2 cpu (one in

RE: [python-win32] Exit Status of Microsoft Patches

2005-03-28 Thread Mark Hammond
I tried installing a microsoft security patch for XP using os.system method on windows 2000 professional. The installtion failed because of incompatibility, but it still returned an exit code of ' 0 '.I also tried using os.popen2,3,4 methods but didnt work.Any Inputson how i can get the

RE: [python-win32] Re: Help on using win32api.SendMessage to sendkeystrokes

2005-04-02 Thread Mark Hammond
as i understand it, then... PostMessage expects exactly 32bits... and my guess is that since python has no unsigned ints, a 32bit value needs more than 32bits, so python makes it a long, and then postmessage complains about longs because it expects an int-sized value. PostMessage wants a

RE: [python-win32] Trouble running profiler

2005-04-04 Thread Mark Hammond
I'm afraid I haven't recently used the profiler with win32com. I have recently used hotshot (which works quite well), but not with win32com.client.dynamic objects. I've no idea where that error is coming from. I'm not sure of the real issue, but I do note that the problem occurs when building

RE: [python-win32] Can't load wmi with Python 2.4

2005-04-05 Thread Mark Hammond
C:\Python24\Lib\site-packages\win32com\client\gencache.py, line 559, in AddModuleToCache dict = mod.CLSIDToClassMap AttributeError: 'module' object has no attribute 'CLSIDToClassMap' Does anyone know how to fix this? It looks like I'm missing some functionality. It looks like something

RE: [python-win32] win32dph.EnumObjectItems problem

2005-04-06 Thread Mark Hammond
Hi All, I have a problem using win32pdh with Python22. The call of win32pdh.EnumObjectItems changes the decimal point from . to , on my system. I think it could be a problem with the language setting form german. So I run in trouble with unpickle of float objects. Is there a soulution or

RE: [python-win32] Can't catch WM_CREATE

2005-04-20 Thread Mark Hammond
i can't seem to catch a WM_CREATE message in simple code. i expect my code to print 'create', but it doesn't The problem is the way win32gui works. win32gui sub-classes the created window *after* the call to CreateWindow returns - however, WM_CREATE is sent *before* CreateWindow returns. It

RE: [python-win32] drawing a bitmap

2005-04-21 Thread Mark Hammond
hi, i can't seem to create a bitmap in memory using pywin32. my assert fails, telling me that the bitmap size is (0,0)? I'm no expert on GDI programming at all. However, I have code that works that looks like: hdcBitmap = win32gui.CreateCompatibleDC(0) hdcScreen = win32gui.GetDC(0)

RE: [python-win32] py2exe, COM servers on machine without py2exe

2005-04-26 Thread Mark Hammond
powerpoint = Target( description = Python Remote PowerPoint Server, ## Build source file. For COM servers, the module name (not the ## filename) must be specified! modules = [PowerPointUI], create_exe = False, ) Try adding dest_base=ppui to those params. That

RE: [python-win32] dynamic Word strangeness

2005-04-26 Thread Mark Hammond
...I've started getting problems with dynamic dispatch G'day Robin, Is there a phantom Word process still hanging around? Does the error persist after a reboot. Do you have access to another machine which can run the tests? Mark ___

Re: [python-win32] win32all-155/genpy/universal incompatibility

2005-05-10 Thread Mark Hammond
It appears that win32com/client/genpy.py and win32com/universal.py in win32all-155 are incompatible: genpy.py/VTableItem.WriteVTableMap writes vtable entries as six-tuples but universal.py/Method.__init__ unpacks them as three-tuples. This manifests itself as an unpack error in

Re: [python-win32] Ref-count bug in win32file.GetQueuedCompletionStatus

2005-06-01 Thread Mark Hammond
Hi, I think I've found a ref-count bug in win32file.GetQueuedCompletionStatus You have indeed! GetQueuedCompletionStatus used to assume that the OVERLAPPED object was previously added to the IOCP via PortQueuedCompletionStatus. I've now fixed that bug and checked the changes into CVS.

Re: [python-win32] 1MB Thread Stack Size

2005-06-01 Thread Mark Hammond
win32process.beginthreadex allows you to specify the size. However there is almost certainly a better way of doing what you want than creating that many threads, generally using non-blocking operations and an IO Completion Port - what exactly are you doing? I believe the stackless prject is all

Re: [python-win32] return pramater in com object function

2005-06-02 Thread Mark Hammond
One of the functions in the com object I need to use has a pointer in one of it's functions (object.function(string input, struct * output)) In that case you should be writing: ret = object.function(input) And ret should be the record structure. Mark

Re: [python-win32] Strange page header text in PythonWin

2005-06-02 Thread Mark Hammond
Title: Message I'm afraid you would need to look in pythonwin\pywin\scintilla\view.py and try to determine what is going wrong. Cheers, Mark -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Robert AdamsSent: Friday, 3 June 2005 4:24 AMTo:

Re: [python-win32] COM server with events and multiple threads

2005-06-02 Thread Mark Hammond
I attached a zip file that contains a small python COM server and a small VB6 client that reproduces the problem. The server sends events to the VB6 client, but the problem is the events are handled in different threads in the VB6 client. I would appreciate it if someone could tell me what

Re: [python-win32] COM server with events and multiple threads

2005-06-03 Thread Mark Hammond
Thanks for the hints, I will try to modify the sample now to make it work using inter thread marshalling. But isn't it possible to have all the threads in the python COM server run in a single MTA? Not when the hosting application (VB in this case) is not in the MTA. You either need to

Re: [python-win32] IIS CGI installation

2005-06-05 Thread Mark Hammond
There are other ways of using Python with IIS, such as: Also note that recent pywin32 builds ship with Python support for ISAPI filters and extensions. The support is quite low-level (ie, no significant attempt to abstract the ISAPI interface) which is either good or bad, depending on your

Re: [python-win32] 'Recent files' in IDE

2005-06-09 Thread Mark Hammond
Having moved up to Python 2.4 (with pythonwin build 203), I Fixed in build 204. Mark ___ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Can not import win32ui module the second time!

2005-06-18 Thread Mark Hammond
In general, finalizing and re-initializing Python has a number of issues - these functions were not designed to be called that way. (Please try and send plain-text mails to this list (for some reason my mailer refuses to even switch my reply back to plain-text)) Mark -Original

Re: [python-win32] filling Windows properties Summary tab?

2005-06-23 Thread Mark Hammond
These properties generally work for COM "structured storage" files.Microsoft Office documents and a number of others use this format, and the win32com functions allow you to get and set these properties. If the files are not these COM storage files, then you may need to look at creating a

Re: [python-win32] Failure in makepy.py

2005-06-28 Thread Mark Hammond
This sounds like a bug in Python 2.4 and you are using ActivePython. The recent pywin32 builds have a work-around for this problem, but ActivePython was built before this was in place. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Fitzhugh, Cary

Re: [python-win32] detect mapped network path

2005-06-30 Thread Mark Hammond
..but how do i find out if let's say X:\foo\bar\blarg.baz is a local path or in fact a mapped network path? win32api.GetLogicalDriveStrings() may also help. Mark ___ Python-win32 mailing list Python-win32@python.org

Re: [python-win32] polling values from physical sensors

2005-07-06 Thread Mark Hammond
I'm currently trying to write service in python (prototyping), this service will, ideally, poll physical sensors (such as temperature sensor, light sensor,...) to get range of values. I want to write it on a Win32 platform. But, My problem is: I don't have any idea of the necessary hardware

Re: [python-win32] win32pipe and buffer size

2005-07-12 Thread Mark Hammond
if __name__ == '__main__': child = subprocess.Popen( ['python', 'echo.py'], Try adding -u as an option to Python - this will force Python to reopen stdout etc as unbuffered (ie, the problem is the client is buffering) Mark ___

Re: [python-win32] GetMessage/PeekMessage not defined AND Buildingwin32all with MinGW

2005-07-27 Thread Mark Hammond
As it turns out these have been added to win32gui (all except PeekMessage - but I just added that). Let me know the version of Python you are using and I will mail you a new win32gui. I can't answer the MinGW question as I have never used it - but would be happy to accept patches to setup.py to

Re: [python-win32] returning COM objects from a COM server

2005-08-04 Thread Mark Hammond
AMAZING !! It is depressing to see how easy it is :-) It depends on how you look at it - I consider the need to manually wrap objects a significant wart :) Is there a Wiki for win32all or a living website (news, roadmap, TODO, ideas) ? Nope - sourceforge has a few of those facilities, but

Re: [python-win32] Ugh...native Windows interactive Python 2.4 inCygwin terminal

2005-08-07 Thread Mark Hammond
I apologize sincerely and in advance if this problem has already been discussed. I have been unable to find any reference to anything similar in either the Python or Cygwin mailing lists, FAQs, etc. Both cygwin and native Python also work fine for me under the default cygwin shell. If it is

Re: [python-win32] build list of all tasks like Alt-TAB box

2005-08-07 Thread Mark Hammond
Does anyone know the appropriate functions to call to narrow down these window handles to just those that are present in the taskbar? Checking the window is a top-level window gives a better result for me. ie: if IsWindowVisible(hwnd) and not GetWindowLong(hwnd, win32con.GWL_STYLE)

Re: [python-win32] Python interpreter crashes after trying to callbacka python function with PyObject_CallObject from a dll

2005-08-10 Thread Mark Hammond
static PyObject *my_callback = NULL; PyMODINIT_FUNC my_set_callback(PyObject *args) { PyObject *temp = args; Py_XINCREF(temp); /* Add a reference to new callback */ Py_XDECREF(my_callback); /* Dispose of previous callback */ my_callback = temp;

Re: [python-win32] Python, Com and SafeArrays

2005-08-10 Thread Mark Hammond
I've encountered a problem when trying to use Com in some instances. There is a method on a Com object called getData() which takes in 4 paramaters ... all pointers ... and fills them with data. I'm currently using pointer() in ctypes on the four args as they go in (like

Re: [python-win32] keep tkinter window always on top

2005-08-21 Thread Mark Hammond
Does anyone know how to keep a tkinter window always on top, despite attempts to focus other windows? Here is my failed attempt. I've tried both tkinter-only and win32-specific solutions. For this code, the window does stay in front of the dos box it's launched from if I try to focus the

Re: [python-win32] Installing a Python script as service

2005-08-26 Thread Mark Hammond
Oops - I missed the original - thanks Roger! I've now changed that check to: if os.path.splitext(win32service.__file__)[0].endswith("_d"): Mark -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Roger UpoleSent: Saturday, 27 August 2005 11:51

Re: [python-win32] win32com events using native interfaces

2005-09-15 Thread Mark Hammond
This should be possible with pywin32 - arbitrary interfaces can be *implemented* by pywin32, just not called. You will need to setup the event mechanism just as if they were IDispatch based events. However, you will also need to setup the COM event class to reference the typelib and typelib

Re: [python-win32] Window Media Player WMPlayer.OCX

2005-09-15 Thread Mark Hammond
I got a strange problem that I can play media files (mp3 etc) through the Pythonwin.exe with the WMPlayer.OCX. However, it could not be done through the shell. When I checked the player.status, it shows Opening media Please help. As far as I know, the WMPlayer OCX will only work as a

Re: [python-win32] Client site not available

2005-09-20 Thread Mark Hammond
The same process works fin in VBScript on the example page from MagTek.. Does it work from VBScript executed via cscript/wscript? If it only works from VBScript inside a webpage hosting the control, the problem will be that you need an OCX container to host the control. Pythonwin is capable

Re: [python-win32] [Pywebsvcs-talk] Using SOAPpy Within a WindowsNT service

2005-09-26 Thread Mark Hammond
As a matter of interest, is there a reason the pywin32 package wasn't able to host your service for free? It works quite well with a number of sophisticated systems (including Zope) and even is supported by py2exe (so you need not install Python itself) Mark. -Original

Re: [python-win32] explorer clone

2005-09-26 Thread Mark Hammond
I'm trying to make an explorer clone using python-win32.(not the tree. just the folderview on the right side.) I know that I have to use the IShellFolderIShellView, but don't know how to. If you are writing a clone and are only interested in the file system, there would be no need to use the

Re: [python-win32] Load PDF

2005-10-03 Thread Mark Hammond
This crash happens deep inside Acrobat itself and seems like a bug in that software. Running the following _vbscript_ code produces the exact same error for me: set test = CreateObject("AcroPDF.PDF.1")test.LoadFile("filename.pdf") Mark -Original Message-From: [EMAIL

Re: [python-win32] Pythonwin problem

2005-10-12 Thread Mark Hammond
After debugging a particular program I started getting funny messages about window handles being bad. Then I get this at startup in a dialog box from the runtime library Runbtime Error! Program c:\python\lib\site-packages\pythonwin\Pythonwin.exe R6025 - pure virtual function call

Re: [python-win32] errors running C++ client against python COM server

2005-10-12 Thread Mark Hammond
'server.MyConnectableServer instance at 0x01483B48' was created, but does not support the interface 'IConnectableServer'({F51A6858-F43E-4CF9-B603-6D15D3E8DB71}): No such interface supported, None, None) So the problem is our gateway doesn't think we support that interface. # putting typelib

Re: [python-win32] Possible bug: what information to provide

2005-10-12 Thread Mark Hammond
One more strange thing: MakePy recognised the object as IRepository rather then Repository I'm not sure what you mean here. Please post a complete code sample, including all output that confuses you or you believe to be wrong. Makepy.py output (fragment, for information about the

Re: [python-win32] Control-C

2005-10-13 Thread Mark Hammond
I've looked around, but I wasn't able to find anything about this issue. I am writing an application that calls a separate windows application as a process. That's not a problem, I can get it to run and do what it needs to do. However, the normal way to stop the separate windows

Re: [python-win32] win32com calling C++ COM interface

2005-10-19 Thread Mark Hammond
Your code is explicitly creating a buffer object, which the win32com framework translates as "array of bytes". Try just passing a list (or tuple) of integers instead of the buffer. Mark -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Shad

Re: [python-win32] findwindow by its class name

2005-10-21 Thread Mark Hammond
Title: Re: [python-win32] findwindow by its class name If all else fails, youcould create a win32gui based hidden window with a classname of your choice. pywin32's win32gui_taskbar.pydoes exactly this. You would probably need to create this window in its own thread running a win32gui

Re: [python-win32] thumbnails

2005-10-24 Thread Mark Hammond
There are a couple of types unsupported by the property storage code. I did try adding support, but the VT_CF structure is very poorly documented by MS. After following the best instructions I could find, I did appear to get data in CF_METAFILEPICT format, but I was unable to make

[python-win32] pywin32 build 205 just released.

2005-10-24 Thread Mark Hammond
Hi all, I've just released build 205 of the pywin32 extensions - you can find it via: http://sourceforge.net/projects/pywin32 or directly via: http://sourceforge.net/project/showfiles.php?group_id=78018package_id=79063 release_id=365777 In summary, this release is mainly bug fixes, but a few

Re: [python-win32] Possible bug: what information to provide

2005-10-27 Thread Mark Hammond
Python interface only invokes method without attributes, when called without brackets: i.e: ref.Update() does not work, while ref.Update does invoke correct _method_ The code is not using Makepy, The problem is that the object is being asked to invoke a *property* named Foo, but is

Re: [python-win32] Getting pywin32 build number

2005-10-27 Thread Mark Hammond
 Nope, that's it - or you could use win32apiGetFileVersionInfo to check a specific DLL/.pyd. Mark. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Justin JohnsonSent: Friday, 28 October 2005 7:43 AMTo: python-win32@python.orgSubject:

Re: [python-win32] win32com and GetRef

2005-11-03 Thread Mark Hammond
Mark Hammond wrote: Not from an external process, no - xpcom does not work across processes. If you wanted to write a Mozilla extension (ie, some chrome), then other work I am doing with the Mozilla guys will soon make this possible - you will be able to use Python whereever you can

Re: [python-win32] Reading custom output parameters fromLabVIEW/Acti veX

2005-11-08 Thread Mark Hammond
So the new question is: how do you create a 1D array of variants in python? From what I've read this is normally handled behind the scenes by PythonCom...? That's correct - just pass a list or tuple. However, that is rarely the complete answer - what *type* of variant should be in the array?

Re: [python-win32] com error

2005-11-08 Thread Mark Hammond
Hi Mark Not sure if I got what you suggested correct. The method I am trying to use is defined as: def SyncWrite(self, NumItems=defaultNamedNotOptArg, ServerHandles=defaultNamedNotOptArg, Values=defaultNamedNotOptArg), Errors=pythoncom.Missing): There appears to be an extra close paren

Re: [python-win32] mapisend.py - How does it work?

2005-11-15 Thread Mark Hammond
Specifically I was wondering: Does it require that I have outlook installed? It requires outlook plus the simple mapi, or cdo libraries. These are an optional component of the office 2000 install that is de-selected by default (ie, you need to explicitly install it). Worse, for later Outlook

Re: [python-win32] Can I pass non-VARIANT SAFARRAYs via COM withoutconverting to VA RIANT?

2005-11-26 Thread Mark Hammond
Is there any way that I can configure python-win32 to use VT_V8 as the element type of a SAFE_ARRAY and suppress any conversion to VT_VARIANT? Not without patching the code, I'm afraid. The code (oleargs.cpp) has explicit support for VT_UI1, but everything else does go through the generic

Re: [python-win32] Error calling win32pdh.EnumObjectItems

2005-11-28 Thread Mark Hammond
It looks like you have an old win32all version (it looks like it was fixed in win32all-154). This should be fixed in all pywin32 versions available from sourceforge. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rogelio Flores Sent: Tuesday, 29

Re: [python-win32] Python-win32 Digest, Vol 33, Issue 7

2005-12-06 Thread Mark Hammond
Certainly COM would work. In this case your VB EXE would use CreateObject to create a Python implemented object. As what type of Python Object? I have the VB6 ide open, and the references Browser as well, there is no generic Python object to include into a VB project. Which means one

Re: [python-win32] Python-win32 Digest, Vol 33, Issue 7

2005-12-07 Thread Mark Hammond
: Tony C [mailto:[EMAIL PROTECTED] Sent: Thursday, 8 December 2005 3:25 PM To: Mark Hammond Cc: python-win32@python.org Subject: Re: Python-win32 Digest, Vol 33, Issue 7 Ok, I'm about 90% there now I've used the Simple.py from page 213, because there is less involved. when I run it- I see

Re: [python-win32] How to unload ShellExtension?

2006-01-04 Thread Mark Hammond
I have previously asked about how to reload a ShellExtension during development. There a a few good suggestions like killnig the explorer process. Now I run into a bigger issue. When I uninstall (using innosetup), the process is still loaded and it lock up scores of DLLs. Killing explorer is

[python-win32] pywin32 build 206

2006-01-09 Thread Mark Hammond
Hi all, I have just released build 206 of the pywin32 extensions. Change log and release notes: https://sourceforge.net/project/shownotes.php?release_id=384202 Download via: https://sourceforge.net/project/showfiles.php?group_id=78018 Please log any issues via the SourceForge bug

[python-win32] pywin32 build 207

2006-01-10 Thread Mark Hammond
Roger Upole kindly pointed out that build 206 had a regression in the win32gui.CreateDC() function. As a result I've released build 207. The fix to win32gui.CreateDC() is the only change. Change log and release notes: https://sourceforge.net/project/shownotes.php?release_id=384458 Download

Re: [python-win32] Client site not available

2006-01-23 Thread Mark Hammond
1) I wish to be able to use the events available in the object as well, and after much reading (and purchasing of your book, Mark - which helped ALOT in several other areas - thank you!) I was left feeling a bit lost in the 'events' arena. Here is the code I am attempting (short and simple)

Re: [python-win32] Client site not available

2006-01-23 Thread Mark Hammond
Mark Hammond wrote: Try leaving the events class as an old style class (ie, don't derive from object) Hmm.. I did that, and got pretty much the same output - does this stack trace help at all? The code listed at the bottom is my complete code for my test. I don't need anything else

Re: [python-win32] AttributeError: 'NoneType' object has no attribute 'CLSID' from a DispatchWithEvents call

2006-01-24 Thread Mark Hammond
I have now created the basics of my application that uses a USB HID card reader peripheral via a vendor supplied OCX com control, and it runs fine from both the IDE (WingIDE) and the command line. Gathers the data and stores it cleanly. Much happiness there. :) However, when I compile it

Re: [python-win32] MAPI, windows service and getting handle to executing outlook process

2006-01-30 Thread Mark Hammond
Try: outlook=win32com.client.GetActiveObject("Outlook.Application") Mark. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Amrit JassalSent: Tuesday, 31 January 2006 8:59 AMTo: python-win32@python.orgSubject: [python-win32] MAPI,windows

Re: [python-win32] Extracting share permissions

2006-01-30 Thread Mark Hammond
It looks as though the SHARE_INFO_502 supports this via the sh502_security_descriptor attribute. Presumably this can be used with NetShareGetInfo and NetShareSetInfo. Mark. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Brad Tilley Sent: Tuesday, 31

Re: [python-win32] Extracting share permissions

2006-01-31 Thread Mark Hammond
Mark, would you write an example of this using SHARE_INFO_502? I'm afraid I don't have the time to do it all. As a clue: import pprint pprint.pprint(win32net.NetShareEnum(None, 502)) ([{'current_uses': 0, 'max_uses': -1, 'netname': u'IPC$', 'passwd': None, 'path': u'',

Re: [python-win32] Problem passing a VARIANT argument to a method of aCOM object

2006-02-04 Thread Mark Hammond
I am struggling with a problem related to passing a VARIANT argument to a COM object. I am getting this exception: TypeError: The VARIANT type is unknown (001e) Hmmm - I guess that is a bug in pywin32 - that variant type *is* valid in a TYPEDESC, so pywin32 probably should convert that

Re: [python-win32] Problem passing a VARIANT argument to a method of aCOM object

2006-02-06 Thread Mark Hammond
I tried changing the 30 to 8 in the above line. This does *not* work either, although it gives a different error this time: obj.AddTest('IsBuy', True) Traceback (most recent call last): File stdin, line 1, in ? File c:\Python24\lib\site-packages\win32com\gen_py\98B8AE14-466F-11D6-

Re: [python-win32] PythonService.exe and Windows Server 2003

2006-02-06 Thread Mark Hammond
e else out in the future:pywintypes.error:(1783,'RegisterEventSource/ReportEvent','The stub recieved bad data') Mark On 2/5/06, Mark Hammond [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]]On Behalf Of mark mclarnon I didnt record the error code that was

Re: [python-win32] Explicit variant types for Invoke InvokeTypes (WasRe: Autocad.*)

2006-02-06 Thread Mark Hammond
I must admit I don't know how to fully test my implementation. I also have at least one bug related to strings, which the test below will demonstrate. I am soliciting any help I can get to solve the general case. Or, failing that, I'm wondering if a less-general patch would be accepted

Re: [python-win32] Problem passing a VARIANT argument to a method of aCOM object

2006-02-06 Thread Mark Hammond
Does the error above show with some certainty that it's a problem with the COM object? Sadly it doesn't demonstrate much with any certainty! Humm... Is there a way to debug the python side more carefully? E.g., using a lower-level interface in the pythoncom module or something?

Re: [python-win32] win32ui can't be found .. some places.

2006-02-06 Thread Mark Hammond
Traceback (most recent call last): File CharmAnalysis05.py, line 24, in ? File ddeclient.pyc, line 6, in ? File pywin\mfc\object.pyc, line 3, in ? File win32ui.pyc, line 9, in ? File win32ui.pyc, line 7, in __load ImportError: DLL load failed: The specified module could not

Re: [python-win32] Problem passing a VARIANT argument to a methodof aCOM object

2006-02-07 Thread Mark Hammond
STDMETHODIMP CTTOrderSelector::AddTest(LPCSTR lpProperty, VARIANT vValue) LPCSTR is not a valid COM type, but somehow it is correctly handled in C#. The authors claim that their C# client code has been tested and is known to work correctly. I assume that the C# implementation is using the

Re: [python-win32] writing long integer values to Excel

2006-02-12 Thread Mark Hammond
I got the impression from table 12-1 of Python Programming on Win32 that writing 3 *(10 **9) to Excel would succeed, but it seems to overflow, while writing 3.0 *(10 **9) succeeds. Is this standard behavior, or perhaps a bug? Yes, it is a bug. I have fixed it here. As you noticed, a work

Re: [python-win32] saving an ole control object embedded in a powerpoint

2006-02-20 Thread Mark Hammond
The problem is that I don't know how to obtain something that would be accepted as an IStream (through python/com machinery) and that would write everything to a file or in a string, and that I can read later. Look at the win32com.server.util FileStream class. Usage would be something like:

Re: [python-win32] DispatchWithEvents and ADO

2006-03-08 Thread Mark Hammond
include DispatchWithEvents both the Execute() and Close() methods no longer work for my Dispatch object, with a Member not found error appearing. Why does Execute and Close work with Dispatch by itself but not when DispatchWithEvents is added? What I find interesting is that both the

Re: [python-win32] DispatchWithEvents and ADO

2006-03-08 Thread Mark Hammond
Oops - that last mail snuck away from me! Enabling debug mode for event handlers is tricky - you probably could open the makepy generated file and locate the function in the events class: def _query_interface_(self, iid): import win32com.server.util if

Re: [python-win32] IE toolbar button in Python

2006-03-08 Thread Mark Hammond
Roger Upole wrote: There's an IE toolbar button demo in CVS: http://cvs.sourceforge.net/viewcvs.py/pywin32/pywin32/com/win32com /demos/iebutton.py?rev=1.1view=log I looked at this, but can't figure out what to do with it. Are there any instructions? What seems apparant is that it

Re: [python-win32] IE toolbar button in Python

2006-03-09 Thread Mark Hammond
in traceutil, and then IE is crashing. Ahh, yes, it all comes back to me now - that is the problem that means you must wait for build 208 :( I'll try and do that early next week (I'm away for the weekend!) Mark ___ Python-win32 mailing list

Re: [python-win32] Casting to a specific interface

2006-03-09 Thread Mark Hammond
I'm afraid IMAPIStatus isn't exposed via pywin32 - depending on your patience, I could probably get it done within a week or so, maybe even in time for build 208 :) Mark -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Amrit JassalSent:

Re: [python-win32] Resize a control? How?

2006-03-13 Thread Mark Hammond
But how on eatrh can I set new widths and heights of a control? Do I have to re-create the control using CreateWindow? Isn't there another way? MoveWindow is the call you are after. Mark ___ Python-win32 mailing list Python-win32@python.org

Re: [python-win32] Reading a UInt32 array from LabVIEW

2006-03-14 Thread Mark Hammond
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ola Rylow I'm accessing LabVIEW through the ActiveX interface and I'm having a problem with reading a UInt32 array. Support for VT_UI4 safe-arrays was added in pywin32 build 207, so you should try that. Note however that build 208,

Re: [python-win32] GetKeyboardState - API not covered?

2006-03-15 Thread Mark Hammond
I wonder if the goal of pywin32 is to have a comprenhensive interface to win32 API, or if the API are implemented on as needed basis. Both :) I do try and keep it comprehensive (eg, by implementing a complete family of functions when possible), but the reality is that many API functions are

Re: [python-win32] Pythoncom error

2006-03-15 Thread Mark Hammond
Hello, I'm stress testing an application I have written using the Python Asp bindings, on occasions I get an ASP 0147 error (Internal Server Error), In the IIS logs it manifests itself as a c005 trapable error. That sounds like an Access Violation is happening - which probably is *not*

Re: [python-win32] Pythoncom error

2006-03-16 Thread Mark Hammond
Here's the thing; I took your advice and kept an eye out for errors related to the debugger support and fixed them when I found them (often with a just quick try except clause as you suggested, I'll revisit them when I get time), Please do, and feed the changes you made back to me (even if I

Re: [python-win32] NT Service not re-startable after reboot

2006-03-16 Thread Mark Hammond
I'm afraid I've no idea. The first thing to check is that username configured to use the service, and check that the service does not rely on any network shares or similar. Most service problems relate to this (eg, trying to run a service from a mapped drive as the LocalSystem account doomed to

[python-win32] pywin32 build 208

2006-03-19 Thread Mark Hammond
Hi all, I have just released build 208 of the pywin32 extensions. Change log and release notes: https://sourceforge.net/project/shownotes.php?release_id=403008 Download via: https://sourceforge.net/project/showfiles.php?group_id=78018 Please log any issues via the SourceForge bug

Re: [python-win32] newbie problem with DispatchWithEvents

2006-04-03 Thread Mark Hammond
I'm new to python and python-win32. Need to use an instance of IE for a little work. I'm trying looking at the examples found, but I'm encountering a big problem to proceed: if I use win32com.client.Dispatch, all works fine, I can manipulate the IE instance without problems. But I need to

Re: [python-win32] Runnin Python app as service with separate console

2006-04-05 Thread Mark Hammond
I have a robust, stable Python script that runs 24-7, crunching a telnet feed of real-time data. Problem is, it has to run in a dos console window on the desktop. I would like to run it as a service, If it must run on the desktop of the logged in user, then this is not what services are for.

Re: [python-win32] Garbage collection of dispatched classes withdispatched classes

2006-04-05 Thread Mark Hammond
Hi, I'm hoping someone might provide some COM dispatching insights as I'm relatively new to it in Python. Does using static binding provide for better garbage collection when the dispatched class has dispatched classes of it's own? Nope - it should make no difference. The nitty

Re: [python-win32] Windows Service Parameters

2006-04-06 Thread Mark Hammond
Hello, Does anybody have an example of getting hold of the start parameters in a Python windows service? I was half expecting them to be passed to SvcDoRun but I can't see that they are. Not an example - but they are passed to your service's __init__ function. Most of the examples don't show

Re: [python-win32] WMI Performance API

2006-04-10 Thread Mark Hammond
I want to use the WMI Performance API to collect performance information from remote boxes. To do this I need to create a WbemScripting. SWbemRefresher object like so: objRefresher = CreateObject(WbemScripting.SWbemRefresher) Is CreateObject something that is available from python (I have

Re: [python-win32] Embed PyCWnd in Tkinter Frame?

2006-04-10 Thread Mark Hammond
I've been searching for this all weekend and can't find what I consider a straight answer. I have an existing Tkinter app which automates IE but I'd really like to embed IE in a Tkinter frame but don't want to have to completely re-write the app. I see it appears fairly easy to

Re: [python-win32] BSTR

2006-04-13 Thread Mark Hammond
The question is, how to convert a String in a BSTR (unicodestring with header)? Python will *always* (unless an object's typelib indicated otherwise) pass a VT_BSTR when a string literal is specified. I'm afraid I can't speculate on what the problem may otherwise be. Mark

Re: [python-win32] Simple questions aboutwin32pdhutil.GetPerformanceAttributes

2006-04-26 Thread Mark Hammond
Please see the comments in win32pdhutil.GetPerformanceAttributes - they explain that many attributes, particularly the processor ones, require 2 samples to give reasonable results. The comment says: # NOTE: Many counters require 2 samples to give accurate results,# including "% Processor

Re: [python-win32] Referencing SimpleCOMServer-based COM object fromVisStudio C# code?

2006-04-28 Thread Mark Hammond
I am trying to access my python class, implemented as a COM server, from my Visual Studio C# application. The problem is when I try to add a reference with Visual Studio, my COM object isn't listed. When I run PythonWin and use its COM Browser tool, my COM object is in one of the registered

  1   2   3   4   5   6   7   8   9   >