[python-win32] com events while running wx main loop

2007-04-17 Thread Christian K.
Hi, I'm trying to recieve com events in a wxpython application. I modified an example posted here by Thomas Heller some time ago. It seems that the events are not delivered. Am I doing something wrong or is this just a limitation of com/wxPython? Thanks for any hint, Christian

Re: [python-win32] com events while running wx main loop

2007-04-17 Thread Christian K.
sorry. I forgot the attachment. Christian import unittest import comtypes.client import wx class EventHandler(object): Instances are called when the COM object fires events. def __init__(self, view, name): self.view = view self.name = name def __call__(self,

Re: [python-win32] com events while running wx main loop

2007-04-18 Thread Christian K.
Thomas Heller wrote: Christian K. schrieb: sorry. I forgot the attachment. Christian import unittest import comtypes.client import wx class EventHandler(object): Instances are called when the COM object

Re: [python-win32] com events while running wx main loop

2007-04-20 Thread Christian K
Thomas Heller wrote: Christian K. schrieb: Second, if you are running the exact sample that I posted then it should work for InternetExplorer, and with slight changes also for Outlook. At least it worked for me. Well, here it doesn't. comtypes uses fairly extensive logging calls

[python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Hi, I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. Any class I made up so far gives the same error: File stdin, line 333, in notify TypeError: The Python instance can not be converted to a COM object So what

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Mark Hammond wrote: I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. This might be tricky unless pywin32 already has support for the specific interface you need. I want to receive 'new mail' notifications from

[python-win32] meaning of bin string representation of PR_ENTRYID

2007-06-28 Thread Christian K.
Hi, can anybody tell me the meaning of the binary string representation of a PR_ENTRYID, as obtained by calling GetProps() on a mail item? I get e.g. the following IDs: 3C437E32AFD11C49ABB743DDE9EDFE6BE4652000 3C437E32AFD11C49ABB743DDE9EDFE6B24602000

Re: [python-win32] meaning of bin string representation of PR_ENTRYID

2007-06-28 Thread Christian K.
Mark Hammond wrote: can anybody tell me the meaning of the binary string representation of a PR_ENTRYID, as obtained by calling GetProps() on a mail item? Its a binary value that is unique for the item (but only unique within the store - PR_STORE_ENTRYID will tell you the store ID) I get

Re: [python-win32] meaning of bin string representation ofPR_ENTRYID

2007-06-29 Thread Christian K.
Mark Hammond wrote: The values above already *are* a hexadecimal value - you can't safely change any part of it. I do not want to change it. I hoped that the extracted part might be enough to identify a message within one message store. That's what I meant - I should have said you can't

[python-win32] how to terminate a extended mapi session

2007-08-24 Thread Christian K.
Hi, what must I take care of by myself when I want to terminate a program which communicates with Outlook through the extended mapi interface, i.e. in addition to session.Logoff and mapi.MAPIUnitialize? Currently I get the following errors upon prorgam termination and, what is more important,

[python-win32] writin Outlook's custom action rules in python?

2007-10-15 Thread Christian K.
Hi, is there any chance that one could write a custom action rule (CAR, see http://support.microsoft.com/?kbid=151690) for Outlook in python? Christian ___ python-win32 mailing list python-win32@python.org

[python-win32] gui examples

2007-10-16 Thread Christian K.
Hi, could somebody point me please to examples of gui programming using pywin32? Thanks, Christian ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] gui examples

2007-10-16 Thread Christian K.
Tim Golden mail at timgolden.me.uk writes: Christian K. wrote: Ludovic Reenaers wrote: Hi, you should download WxPython there is a pretty nice documentation with very detailed samples. cheers, I know, thanks. wxPython is usually my first choice, however this time I just

Re: [python-win32] gui examples

2007-10-16 Thread Christian K.
Thanks everybody for all the pointers. I've enough to play with now. Christian ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32

[python-win32] unable to receive button click notifications

2007-10-17 Thread Christian K.
Hi, I'm just trying the pywin gui examples and I'm wondering why I won't receive any BN_CLICKED notifications in the code attached. Can anyone help? Christian from pywin.mfc import dialog, window import win32ui import win32con import win32api def MakeDlgTemplate(): style =

[python-win32] force outlook ui update

2008-10-25 Thread Christian K.
Hi, I apologize for asking a not specifically python related question but I have no idea where to ask (pointers welcome, too). I noticed that after having written e.g. to the PR_SUBJECT of a mapi IMessage, e.g.: msg = self.msgstore._OpenEntry(self.id, None, mapi.MAPI_BEST_ACCESS)

Re: [python-win32] how to call the dll in python

2008-11-07 Thread Christian K.
ysystudio wrote: I have a windows dll1.dll with a export function: int f1(char filename,char **buf,int *bufLen) { int len; //got the length of file anyway,such as 100 len = 100;//len = getLen(filename); *buf = (char*)calloc(100); *bufLen = len; return 0; } then how can I call the

[python-win32] SOLVED: force outlook ui update

2008-12-14 Thread Christian K .
Hi, a couple of weeks ago I asked how to refresh the outlook view after having modified a mail's properties directly using the extended MAPI. At least for the subject of the mail there is an easy workaround: mailitem.Subject = mailitem.Subject will trigger a refresh of all views of the

Re: [python-win32] mapi - writing to PR_BODY

2009-02-12 Thread Christian K.
Mark Hammond schrieb: On 8/02/2009 7:06 PM, Christian K. wrote: write should return the number of bytes written but it returns None here. It appears Roger fixed this on 2007/08/07 and the fix was in builds 211 and 212. I suppose I am using a recent build - where can I find the version

Re: [python-win32] mapi - writing to PR_BODY

2009-02-13 Thread Christian K.
Mark Hammond wrote: On 13/02/2009 2:35 AM, Christian K. wrote: Mark Hammond wrote: And I had situations, where write indeed did return the number of bytes written, again without any change on the body. My understanding of mapi is very basic but this seems to have to do with the access method

Re: [python-win32] mapi - writing to PR_BODY

2009-02-13 Thread Christian K.
Mark Hammond schrieb: On 13/02/2009 2:35 AM, Christian K. wrote: Mark Hammond schrieb: tuations, where write indeed did return the number of bytes written, again without any change on the body. My understanding of mapi is very basic but this seems to have to do with the access method

Re: [python-win32] mapi - writing to PR_BODY

2009-02-15 Thread Christian K.
Mark Hammond schrieb: On 14/02/2009 12:56 AM, Christian K. wrote: So write seems to work as expected (reporting the right number of bytes) but I have no clue *where* the data is written to. The mail body stays completely unaffected. I guess step 1 would be to see if you can re-read it - ie

Re: [python-win32] mapi - writing to PR_BODY

2009-02-15 Thread Christian K.
Christian K. wrote: def TextToStream(mapi_object, text): prop_id = PR_BODY_A stream = mapi_object.OpenProperty(prop_id, pythoncom.IID_IStream, 0, mapi.MAPI_MODIFY) print stream.Stat(0) print

Re: [python-win32] ANN: PyGUI 2.0

2009-04-16 Thread Christian K .
Hi, I get the following traceback when running any demo. This is on XP using PyGUI 2.0.1 with pythonxy 2.1.12, pywin32 2.13 Christian $ python nag_box.py File nag_box.py, line 1, in module from GUI import ModalDialog, Label, Button, Task, application File

Re: [python-win32] ANN: PyGUI 2.0.2

2009-04-18 Thread Christian K.
Greg Ewing schrieb: PyGUI 2.0.2 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Fixes problem on Windows causing This file should not be imported error. Now I get this traceback: $ python main.py File main.py, line 9, in module from sheetapp import MatSheetApp

Re: [python-win32] ANN: PyGUI 2.0.2

2009-04-20 Thread Christian K .
Greg Ewing greg.ewing at canterbury.ac.nz writes: Christian K. wrote: c:\pythonxy\python\Lib\site-packages\GUI\Win32\ScrollableViews.py, line 31, in __init__ GScrollableView.__init__(self, _win = win) win32ui.error: The object has been destroyed. Do you have any problem

Re: [python-win32] ANN: PyGUI 2.0.4

2009-04-21 Thread Christian K .
Hi Greg, Greg Ewing greg.ewing at canterbury.ac.nz writes: on Windows, although I can't be sure it will fix all the Windows problems people are having, because I haven't been able to reproduce some of them. What is PyGUI? -- PyGUI is a cross-platform GUI toolkit designed

[python-win32] py2exe and com server again

2009-04-27 Thread Christian K.
Hi, despite all the information on this list and on the wiki I can't get my com server up from the py2exe created dll. As it is a outlook com server I followed the approach taken in the spambayes project, i.e. in the addin I have: bValidateGencache = not hasattr(sys, frozen)

[python-win32] COM sending and receiveing events

2009-06-21 Thread Christian K .
Hi, I apologize for my ignorance about COM programming in advance. I would like to be pointed to an example of how I could send a message from a subthread of a COM server back to the main thread. Being an outlook addin, the COM server is already reacting to a couple of Outlook generated events.

Re: [python-win32] 2010 com addin and IRibbonExtensibilty

2010-12-08 Thread Christian K.
Hi Robert, Am 09.12.10 00:05, schrieb robert2682: 2) I'd appreciate it if you'll let me know whether the Tag attribute in the callback can be read. This is the problem I mentioned in my initial response. Just let me know the contents of the second message box after clicking the button in

[python-win32] addin fails to load the first time after login

2011-11-23 Thread Christian K.
Hi, I am observing a strange behaviour of two python com-servers/addins, one of them is called from Excel VBA the other one is an Outlook (both from Office 2003) addin. Both of them work if I register them and start using Outlook or Excel thereafter. However when I log out and login the next

[python-win32] how to create a instance of PyIMAPISession by hand

2013-05-08 Thread Christian K .
The following code has been suggested to me to get a handle to Outlook's mapi session. from win32com.client import Dispatch from win32com.mapi import mapi app = Dispatch('Outlook.Application') app.GetNamespace('MAPI').Session.MAPIOBJECT The MAPIOBJECT would then have to be cast to a

[python-win32] debugging outlook addin

2013-05-19 Thread Christian K.
I need to debug an outlook addin written in python which crashes outlook in a reproducible manner. How could I do that? Is it possible to have the addin loaded from within a pdb session? The addin uses the mapi msgstore wrappers from the spambayes project. The crash occurs while the addin is

[python-win32] wx.Frame with windows parent

2013-06-04 Thread Christian K.
Hi, I asked this some time ago on the wxpython list and still have no solution: I am trying to make a wx.Dialog float on a non-wxpython parent. I get the HWND of the window, call wx.Window_FromHWND(None, HWND) and open the dialog with that parent and FLOAT_ON_PARENT style. This works very well

[python-win32] python3 and extended mapi

2014-06-09 Thread Christian K .
Hi, I was very pleased to see that retrieving properties of a MAPI object yields either a str or bytes type depending on whether the _A or _W property was queried and entryids are always returned as bytes types. Very nice! This makes a lot of bin2str2bin conversion and encoding/decoding code

Re: [python-win32] python3 and extended mapi

2014-06-09 Thread Christian K .
Paul_Koning at Dell.com writes: On Jun 9, 2014, at 9:07 AM, Christian K. ckkart at hoc.net wrote: Hi, I was very pleased to see that retrieving properties of a MAPI object yields either a str or bytes type depending on whether the _A or _W property was queried … Really

Re: [python-win32] python3 and extended mapi

2014-06-09 Thread Christian K.
Am 09.06.14 16:00, schrieb paul_kon...@dell.com: On Jun 9, 2014, at 2:53 PM, Christian K. ckk...@hoc.net wrote: Paul_Koning at Dell.com writes: On Jun 9, 2014, at 9:07 AM, Christian K. ckkart at hoc.net wrote: Hi, I was very pleased to see that retrieving properties of a MAPI object

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Paul_Koning at Dell.com writes: On Jun 9, 2014, at 9:40 PM, Christian K. ckkart at hoc.net wrote: Am 09.06.14 16:00, schrieb Paul_Koning at Dell.com: On Jun 9, 2014, at 2:53 PM, Christian K. ckkart at hoc.net wrote: Paul_Koning at Dell.com writes: On Jun 9, 2014

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Mark Hammond skippy.hammond at gmail.com writes: It would be great if you could open a bug at sourceforge... Done. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Christian K .
Christian K. ckkart at hoc.net writes: Paul_Koning at Dell.com writes: I would only want/expect to see “bytes” types when the values in question are binary data streams, or unknown format. But anytime we’re dealing with text strings, the Python 3 approach is that the Python code

Re: [python-win32] python3 and extended mapi

2014-06-14 Thread Christian K.
Paul_Koning at Dell.com writes: I would only want/expect to see “bytes” types when the values in question are binary data streams, or unknown format. But anytime we’re dealing with text strings, the Python 3 approach is that the Python code sees “str” type, and questions of encoding