From msdin@rpoptions.com Wed Jul 3 00:39:02 2002 From: msdin@rpoptions.com (M Shah Din) Date: 02 Jul 2002 16:39:02 -0700 Subject: [python-win32] empty variants Message-ID: <1025653142.30631.29.camel@chibacity> Hi, I need to pass an empty variant to a COM objects method but I can't figure out how to do it. I asked the same question a while ago, but the proposed solution did not work. I have some more details now... The COM object has a method that looks like this: ------------------------------------------------------------------ Public Sub Foo(ByRef myVariant as Variant, ByRef param1 as String) Dim my_flag as Boolean If IsEmpty(myVariant) Then my_flag = True Else If myVariant Is Nothing Then my_flag = True Else my_flag = False End If End If If my_flag = True Then Set myVariant = CreateObject("some_object") End If myVariant.SomeMethod() End Sub ------------------------------------------------------------------ When I call it from python, the my_flag variable is never True. If I pass in None for myVariant, the VB debugger shows it as being Null. If I pass in pythoncom.Empty, the VB debugger shows it as being Missing. It works fine if I call it from a VB method and just dim the variant without setting it to anything. How can I pass an empty or nothing variant from python? I am using ActiveState ActivePython 2.2 on Win2k. Thanks, Shah From jjorgensen@Tallan.com Wed Jul 3 15:27:53 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Wed, 3 Jul 2002 10:27:53 -0400 Subject: [python-win32] empty variants Message-ID: U2hhaCwNCiANCkknbSBub3QgZmFtaWxpYXIgd2l0aCB0aGUgYWN0dWFsIGNvZGUgYnV0IEkgY2Fu IGVhc2lseSBzZWUgaG93IHRoaXMgd291bGQgaGFwcGVuIHNpbmNlIGEgQnlSZWYgYXJndW1lbnQg d2lsbCBwYXNzIGEgcG9pbnRlciB0byBhIFZBUklBTlQgc28gUHl0aG9uIHdvdWxkIGp1c3QgaW50 ZXJwcmV0IHBhc3NpbmcgTm9uZSBhcyBwYXNzaW5nIG5vIHBvaW50ZXIuIElzIGl0IG5lY2Vzc2Fy eSB0aGF0IHRoZSBmdW5jdGlvbiB0YWtlIHRoZSBWQVJJQU5UIEJ5UmVmPyBDb3VsZCBpdCBpbnN0 ZWFkIHRha2UgaXQgQnlWYWwgYW5kIHRoZW4gcm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1c2luZyBBY3Rp dmVTdGF0ZSBBY3RpdmVQeXRob24gMi4yIG9uIFdpbjJrLg0KCQ0KCVRoYW5rcywNCglTaGFoDQoJ DQoJDQoJDQoJDQoJX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18NCglQeXRob24td2luMzIgbWFpbGluZyBsaXN0DQoJUHl0aG9uLXdpbjMyQHB5dGhvbi5vcmcN CglodHRwOi8vbWFpbC5weXRob24ub3JnL21haWxtYW4vbGlzdGluZm8vcHl0aG9uLXdpbjMyDQoJ DQoNCg== From msdin@rpoptions.com Wed Jul 3 16:31:03 2002 From: msdin@rpoptions.com (M Shah Din) Date: 03 Jul 2002 08:31:03 -0700 Subject: [python-win32] empty variants In-Reply-To: References: Message-ID: <1025710267.6302.5.camel@chibacity> Hi Jens, Unfortunately, I cannot change the code. Its another party's COM object, and I have to use it. Thanks, Shah On Wed, 2002-07-03 at 07:27, Jorgensen, Jens wrote: > Shah, > > I'm not familiar with the actual code but I can easily see how this > would happen since a ByRef argument will pass a pointer to a VARIANT > so Python would just interpret passing None as passing no pointer. > Is it necessary that the function take the VARIANT ByRef? Could it > instead take it ByVal and then return the variant? If you did it this > way it should work if you pass None. > > -----Original Message----- > From: M Shah Din [mailto:msdin@rpoptions.com] > Sent: Tue 7/2/2002 6:39 PM > To: python-win32@python.org > Cc: > Subject: [python-win32] empty variants > > > > Hi, > > I need to pass an empty variant to a COM objects method but I can't > figure out how to do it. I asked the same question a while ago, but the > proposed solution did not work. I have some more details now... > > The COM object has a method that looks like this: > > ------------------------------------------------------------------ > > Public Sub Foo(ByRef myVariant as Variant, ByRef param1 as String) > > Dim my_flag as Boolean > > If IsEmpty(myVariant) Then > my_flag = True > Else > If myVariant Is Nothing Then > my_flag = True > Else > my_flag = False > End If > End If > > If my_flag = True Then > Set myVariant = CreateObject("some_object") > End If > > myVariant.SomeMethod() > > End Sub > > ------------------------------------------------------------------ > > When I call it from python, the my_flag variable is never True. If I > pass in None for myVariant, the VB debugger shows it as being Null. If > I pass in pythoncom.Empty, the VB debugger shows it as being Missing. > It works fine if I call it from a VB method and just dim the variant > without setting it to anything. How can I pass an empty or nothing > variant from python? > > I am using ActiveState ActivePython 2.2 on Win2k. > > Thanks, > Shah > > > > > _______________________________________________ > Python-win32 mailing list > Python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > > From jjorgensen@Tallan.com Wed Jul 3 18:17:26 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Wed, 3 Jul 2002 13:17:26 -0400 Subject: [python-win32] empty variants Message-ID: V2VsbCwgaXQgbWF5IG5vdCBiZSBlYXN5IHRvIGNoYW5nZSB0aGUgcHl0aG9uIHNpZGUuIEl0IHdv dWxkIGJlIGVhc2llciB0byB3cml0ZSBhIHB5dGhvbiBleHRlbnNpb24gbW9kdWxlIGluIEMrKyB0 aGF0IGRvZXMgZXhhY3RseSB3aGF0IHlvdSBuZWVkIGFuZCB1c2UgdGhhdC4gVGhhdCdzIHRoZSBh cHByb2FjaCBJIHdvdWxkIHByb2JhYmx5IHRha2UgYXQgdGhpcyBwb2ludC4NCg0KCS0tLS0tT3Jp Z2luYWwgTWVzc2FnZS0tLS0tIA0KCUZyb206IE0gU2hhaCBEaW4gW21haWx0bzptc2RpbkBycG9w dGlvbnMuY29tXSANCglTZW50OiBXZWQgNy8zLzIwMDIgMTA6MzEgQU0gDQoJVG86IEpvcmdlbnNl biwgSmVucyANCglDYzogcHl0aG9uLXdpbjMyQHB5dGhvbi5vcmcgDQoJU3ViamVjdDogUkU6IFtw eXRob24td2luMzJdIGVtcHR5IHZhcmlhbnRzDQoJDQoJDQoNCglIaSBKZW5zLA0KCQ0KCVVuZm9y dHVuYXRlbHksIEkgY2Fubm90IGNoYW5nZSB0aGUgY29kZS4gIEl0cyBhbm90aGVyIHBhcnR5J3Mg Q09NDQoJb2JqZWN0LCBhbmQgSSBoYXZlIHRvIHVzZSBpdC4gDQoJDQoJVGhhbmtzLA0KCVNoYWg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CT4g ICAgICANCgk+ICAgICAgIFRoYW5rcywNCgk+ICAgICAgIFNoYWgNCgk+ICAgICAgDQoJPiAgICAg IA0KCT4gICAgICANCgk+ICAgICAgDQoJPiAgICAgICBfX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fXw0KCT4gICAgICAgUHl0aG9uLXdpbjMyIG1haWxpbmcgbGlz dA0KCT4gICAgICAgUHl0aG9uLXdpbjMyQHB5dGhvbi5vcmcNCgk+ICAgICAgIGh0dHA6Ly9tYWls LnB5dGhvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9weXRob24td2luMzINCgk+ICAgICAgDQoJPg0K CQ0KCQ0KCQ0KCQ0KCQ0KDQo= From ccampbell@ede.org Thu Jul 4 02:05:07 2002 From: ccampbell@ede.org (Colin Campbell) Date: Wed, 03 Jul 2002 19:05:07 -0600 Subject: [python-win32] Showing/Selecting Excel sheets Message-ID: <5.1.0.14.0.20020703185411.00a8b548@mail.ede.org> Hello all, After bashing this around, trawling the docs and getting greyer by the minute, I'm turning to the repository of wisdom that is this group. With luck, I've buttered you up to the point you can handle yet another iteration of the vanishing Excel worksheet question. I'm sure I've seen it answered a month or so ago; blessed if I can find it! I'm trying to open a workbook in Excel, using ActiveState Python 2.2.1, Excel 2002, and Windows 2000. Eventually, when I teach myself enough win32com, my code will read sheet numbers from a file, create a new workbook, copy the selected sheets into it, and show the result to the user. What is happening at this point in my admittedly incremental development, is that Excel fires up and opens the proper workbook, shows me only the menu, tool and formula bars, and refuses to select anything other then the first sheet in the book. If there is some fairly newby-ish documentation I'm missing, I'd be glad of a reference. My code is below. Many TIA Colin #============================================= #Excel sheet Copier/Hider # trying to hardwire test values from win32com.client import Dispatch xl = Dispatch( 'Excel.Application' ) # create instance of Excel xl.Visible = True # force it to be visible xlFile = "C:/Other/Prg/Finstmts.xls" # workbook to open wkb = xl.Workbooks.Open(xlFile) # tell excel to open it (ok to here) wkb.Sheets(2).Select # show me sheet 2 z = raw_input() # pause the script wkb.Close() # tidy up xl.Quit() # shut down the app xl = None # call the destructor #======================================== -- I believe that the first test of a truly great man is his humility. I do not mean by humility, doubt of his own powers. But really great men have a curious feeling that the greatness is not in them, but through them. And they see something divine in every other man and are endlessly, foolishly, incredibly merciful. -John Ruskin, author, art critic, and social reformer (1819-1900) From MarkA@sundance.com Thu Jul 4 17:35:09 2002 From: MarkA@sundance.com (Mark Ainsworth) Date: Thu, 4 Jul 2002 17:35:09 +0100 Subject: [python-win32] RE: Python-win32 digest, Vol 1 #171 - 2 msgs Message-ID: Subtle but: wkb.Sheets(2).Select() # show me sheet 2 works for me. Notice the Select(). Rgds Mark Ainsworth Quality Manager Sundance Multiprocessor Technology Ltd. Chiltern House, Waterside, Chesham, Bucks HP5 1PS Tel. +44 1494 793167 Fax. +44 1494 793168 MarkA@sundance.com http://www.sundance.com -----Original Message----- From: python-win32-request@python.org [mailto:python-win32-request@python.org] Sent: 04 July 2002 17:00 To: python-win32@python.org Subject: Python-win32 digest, Vol 1 #171 - 2 msgs Send Python-win32 mailing list submissions to python-win32@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/python-win32 or, via email, send a message with subject or body 'help' to python-win32-request@python.org You can reach the person managing the list at python-win32-admin@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-win32 digest..." Today's Topics: 1. RE: empty variants (Jorgensen, Jens) 2. Showing/Selecting Excel sheets (Colin Campbell) --__--__-- Message: 1 Subject: RE: [python-win32] empty variants Date: Wed, 3 Jul 2002 13:17:26 -0400 From: "Jorgensen, Jens" To: "M Shah Din" Cc: V2VsbCwgaXQgbWF5IG5vdCBiZSBlYXN5IHRvIGNoYW5nZSB0aGUgcHl0aG9uIHNpZGUuIEl0IHdv dWxkIGJlIGVhc2llciB0byB3cml0ZSBhIHB5dGhvbiBleHRlbnNpb24gbW9kdWxlIGluIEMrKyB0 aGF0IGRvZXMgZXhhY3RseSB3aGF0IHlvdSBuZWVkIGFuZCB1c2UgdGh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gbXlW YXJpYW50IGFzIFZhcmlhbnQsIEJ5UmVmIHBhcmFtMSBhcyBTdHJpbmcpDQoJPiAgICAgIA0KCT4g ICAgICAgICAgICAgICBEaW0gbXlfZmxhZyBhcyBCb29sZWFuDQoJPiAgICAgIA0KCT4gICAgICAg ICAgICAgICBJZiBJc0VtcHR5KG15VmFyaWFudCkgVGhlbg0KCT4gICAgICAgICAgICAgICAgICAg ICAgIG15X2ZsYWcgPSBUcnVlDQoJPiAgICAgICAgICAgICAgIEVsc2UNCgk+ICAgICAgICAgICAg ICAgICAgIElmIG15VmFyaWFudCBJcyBOb3RoaW5nIFRoZW4NCgk+ICAgICAgICAgICAgICAgICAg ICAgICBteV9mbGFnID0gVHJ1ZQ0KCT4gICAgICAgICAgICAgICAgICAgRWxzZQ0KCT4gICAgICAg ICAgICAgICAgICAgICAgIG15X2ZsYWcgPSBGYWxzZQ0KCT4gICAgICAgICAgICAgICAgICAgRW5k IElmDQoJPiAgICAgICAgICAgICAgIEVuZCBJZg0KCT4gICAgICANCgk+ICAgICAgICAgICAgICAg SWYgbXlfZmxhZyA9IFRydWUgVGhlbg0KCT4gICAgICAgICAgICAgICAgICAgICAgIFNldCBteVZh cmlhbnQgPSBDcmVhdGVPYmplY3QoInNvbWVfb2JqZWN0IikNCgk+ICAgICAgICAgICAgICAgRW5k IElmDQoJPiAgICAgIA0KCT4gICAgICAgICAgICAgICBteVZhcmlhbnQuU29tZU1ldGhvZCgpDQoJ PiAgICAgIA0KCT4gICAgICAgRW5kIFN1Yg0KCT4gICAgICANCgk+ICAgICAgIC0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0K CT4gICAgICANCgk+ICAgICAgIFdoZW4gSSBjYWxsIGl0IGZyb20gcHl0aG9uLCB0aGUgbXlfZmxh ZyB2YXJpYWJsZSBpcyBuZXZlciBUcnVlLiAgSWYgSQ0KCT4gICAgICAgcGFzcyBpbiBOb25lIGZv ciBteVZhcmlhbnQsIHRoZSBWQiBkZWJ1Z2dlciBzaG93cyBpdCBhcyBiZWluZyBOdWxsLiAgSWYN Cgk+ICAgICAgIEkgcGFzcyBpbiBweXRob25jb20uRW1wdHksIHRoZSBWQiBkZWJ1Z2dlciBzaG93 cyBpdCBhcyBiZWluZyBNaXNzaW5nLg0KCT4gICAgICAgSXQgd29ya3MgZmluZSBpZiBJIGNhbGwg aXQgZnJvbSBhIFZCIG1ldGhvZCBhbmQganVzdCBkaW0gdGhlIHZhcmlhbnQNCgk+ICAgICAgIHdp dGhvdXQgc2V0dGluZyBpdCB0byBhbnl0aGluZy4gIEhvdyBjYW4gSSBwYXNzIGFuIGVtcHR5IG9y IG5vdGhpbmcNCgk+ICAgICAgIHZhcmlhbnQgZnJvbSBweXRob24/DQoJPiAgICAgIA0KCT4gICAg ICAgSSBhbSB1c2luZyBBY3RpdmVTdGF0ZSBBY3RpdmVQeXRob24gMi4yIG9uIFdpbjJrLg0KCT4g ICAgICANCgk+ICAgICAgIFRoYW5rcywNCgk+ICAgICAgIFNoYWgNCgk+ICAgICAgDQoJPiAgICAg IA0KCT4gICAgICANCgk+ICAgICAgDQoJPiAgICAgICBfX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fXw0KCT4gICAgICAgUHl0aG9uLXdpbjMyIG1haWxpbmcgbGlz dA0KCT4gICAgICAgUHl0aG9uLXdpbjMyQHB5dGhvbi5vcmcNCgk+ICAgICAgIGh0dHA6Ly9tYWls LnB5dGhvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9weXRob24td2luMzINCgk+ICAgICAgDQoJPg0K CQ0KCQ0KCQ0KCQ0KCQ0KDQo= --__--__-- Message: 2 Date: Wed, 03 Jul 2002 19:05:07 -0600 To: python-win32@python.org From: Colin Campbell Subject: [python-win32] Showing/Selecting Excel sheets Hello all, After bashing this around, trawling the docs and getting greyer by the minute, I'm turning to the repository of wisdom that is this group. With luck, I've buttered you up to the point you can handle yet another iteration of the vanishing Excel worksheet question. I'm sure I've seen it answered a month or so ago; blessed if I can find it! I'm trying to open a workbook in Excel, using ActiveState Python 2.2.1, Excel 2002, and Windows 2000. Eventually, when I teach myself enough win32com, my code will read sheet numbers from a file, create a new workbook, copy the selected sheets into it, and show the result to the user. What is happening at this point in my admittedly incremental development, is that Excel fires up and opens the proper workbook, shows me only the menu, tool and formula bars, and refuses to select anything other then the first sheet in the book. If there is some fairly newby-ish documentation I'm missing, I'd be glad of a reference. My code is below. Many TIA Colin #============================================= #Excel sheet Copier/Hider # trying to hardwire test values from win32com.client import Dispatch xl = Dispatch( 'Excel.Application' ) # create instance of Excel xl.Visible = True # force it to be visible xlFile = "C:/Other/Prg/Finstmts.xls" # workbook to open wkb = xl.Workbooks.Open(xlFile) # tell excel to open it (ok to here) wkb.Sheets(2).Select # show me sheet 2 z = raw_input() # pause the script wkb.Close() # tidy up xl.Quit() # shut down the app xl = None # call the destructor #======================================== -- I believe that the first test of a truly great man is his humility. I do not mean by humility, doubt of his own powers. But really great men have a curious feeling that the greatness is not in them, but through them. And they see something divine in every other man and are endlessly, foolishly, incredibly merciful. -John Ruskin, author, art critic, and social reformer (1819-1900) --__--__-- _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 End of Python-win32 Digest From ccampbell@ede.org Thu Jul 4 18:09:14 2002 From: ccampbell@ede.org (Colin Campbell) Date: Thu, 04 Jul 2002 11:09:14 -0600 Subject: [python-win32] Showing/Selecting Excel sheets In-Reply-To: Message-ID: <5.1.0.14.0.20020704105914.00a8b340@mail.ede.org> --=====================_9907687==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed At 10:35 AM 7/04/02, Mark Ainsworth wrote: >Subtle but: > >wkb.Sheets(2).Select() # show me sheet 2 > >works for me. Notice the Select(). Works for me, too. Bless you! Do I gather that as a general principle, things which look like methods in VBA , such as "WorkBook.Sheets(2).Select " need to look like functions when called from Python via COM, or is there something else I'm missing? TIA Colin Patience serves as a protection against wrongs as clothes do against cold. For if you put on more clothes as the cold increases, it will have no power to hurt you. So in like manner you must grow in patience when you meet with great wrongs, and they will then be powerless to vex your mind. -Leonardo da Vinci, painter, engineer, musician, and scientist (1452-1519) --=====================_9907687==_.ALT Content-Type: text/html; charset="us-ascii" At 10:35 AM 7/04/02, Mark Ainsworth  wrote:
Subtle but:

wkb.Sheets(2).Select()                    # show me sheet 2

works for me. Notice the Select().

Works for me, too. Bless you!
Do I gather that as a general principle, things which look like methods in VBA , such as  "WorkBook.Sheets(2).Select " need to look like functions when called from Python via COM, or is there something else I'm missing?
TIA
Colin

Patience serves as a protection against wrongs as clothes do against cold.
For if you put on more clothes as the cold increases, it will have no power
to hurt you. So in like manner you must grow in patience when you meet with
great wrongs, and they will then be powerless to vex your mind.
 -Leonardo da Vinci,  painter, engineer, musician, and scientist (1452-1519)
--=====================_9907687==_.ALT-- From R.C.Strijbos@tue.nl Fri Jul 5 14:07:02 2002 From: R.C.Strijbos@tue.nl (Strijbos, Dr. R.C.) Date: Fri, 5 Jul 2002 15:07:02 +0200 Subject: [python-win32] Dispatch suddenly generates com_error Message-ID: As a novice to COM I seem to have done something completely wrong: Simply typing: import win32com.client xl=win32com.client.Dispatch("Excel Application") gives me the following traceback (while it has worked before): Traceback (most recent call last): File "", line 1, in ? File "C:\Python22\Lib\site-packages\win32com\client\__init__.py", line 92, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Python22\Lib\site-packages\win32com\client\dynamic.py", line 81, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Python22\Lib\site-packages\win32com\client\dynamic.py", line 72, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147221005, 'Invalid class string', None, None) Any suggestions how to repair the damage? Thanks, Remco Strijbos From jeff@ccvcorp.com Fri Jul 5 17:46:31 2002 From: jeff@ccvcorp.com (Jeff Shannon) Date: Fri, 05 Jul 2002 09:46:31 -0700 Subject: [python-win32] Dispatch suddenly generates com_error References: <20020705160008.13405.24433.Mailman@mail.python.org> Message-ID: <3D25CD67.49D78EDB@ccvcorp.com> > From: "Strijbos, Dr. R.C." > > As a novice to COM I seem to have done something completely wrong: No, only one slight error.... :) > xl=win32com.client.Dispatch("Excel Application") You need "Excel.Application" -- a period instead of a space. The error you're getting is simply because the Windows COM infrastructure cannot find the string you've given. Typically, class strings use a period-separated name. Jeff Shannon Technician/Programmer Credit International From mrroach@uhg.net Fri Jul 5 17:50:22 2002 From: mrroach@uhg.net (Roach, Mark R.) Date: 05 Jul 2002 11:50:22 -0500 Subject: [python-win32] Dispatch suddenly generates com_error In-Reply-To: References: Message-ID: <1025887822.1309.8.camel@tncorpmrr001.uhg> On Fri, 2002-07-05 at 08:07, Strijbos, Dr. R.C. wrote: > As a novice to COM I seem to have done something completely wrong: > > Simply typing: > > import win32com.client > xl=win32com.client.Dispatch("Excel Application") try xl=win32com.client.Dispatch("Excel.Application") -Mark From R.C.Strijbos@tue.nl Fri Jul 5 18:17:16 2002 From: R.C.Strijbos@tue.nl (Strijbos, Dr. R.C.) Date: Fri, 5 Jul 2002 19:17:16 +0200 Subject: [python-win32] Dispatch suddenly generates com_error: even wi th period! Message-ID: Thanks for the replies, but the problem might be a bit more complicated.. Actually, I had the period in my code (sorry for the typo) but even when I type: import win32com.client xl=win32com.client.Dispatch("Excel.Application") I get the same com_error. It works on other Win32 machines, and has worked on this one before, but now apparently something is wrong. I reinstalled ActivePython, but still the same problem. Could it be something in the registry? Remco. From andrew-pywin32@puzzling.org Sat Jul 6 04:09:44 2002 From: andrew-pywin32@puzzling.org (Andrew Bennetts) Date: Sat, 6 Jul 2002 13:09:44 +1000 Subject: [python-win32] Dispatch suddenly generates com_error: even wi th period! In-Reply-To: References: Message-ID: <20020706030943.GA1659@frobozz.local> On Fri, Jul 05, 2002 at 07:17:16PM +0200, Strijbos, Dr. R.C. wrote: > Thanks for the replies, but the problem might be a bit more complicated.. > Actually, I had the period in my code (sorry for the typo) but even when I > type: > > import win32com.client > xl=win32com.client.Dispatch("Excel.Application") > > I get the same com_error. It works on other Win32 machines, and > has worked on this one before, but now apparently something is > wrong. I reinstalled ActivePython, but still the same problem. > Could it be something in the registry? Pardon me for asking the bleeding obvious, but does that machine have Excel installed? -Andrew. From R.C.Strijbos@tue.nl Mon Jul 8 22:37:55 2002 From: R.C.Strijbos@tue.nl (Strijbos, Dr. R.C.) Date: Mon, 8 Jul 2002 23:37:55 +0200 Subject: [python-win32] Dispatch suddenly generates com_error: even wi th period! Message-ID: Yes, it has Excel installed and functioning properly. Remco. -----Original Message----- From: Andrew Bennetts [mailto:andrew-pywin32@puzzling.org] Sent: Saturday, July 06, 2002 5:10 AM To: Strijbos, Dr. R.C. Cc: 'python-win32@python.org' Subject: Re: [python-win32] Dispatch suddenly generates com_error: even wi th period! On Fri, Jul 05, 2002 at 07:17:16PM +0200, Strijbos, Dr. R.C. wrote: > Thanks for the replies, but the problem might be a bit more complicated.. > Actually, I had the period in my code (sorry for the typo) but even when I > type: > > import win32com.client > xl=win32com.client.Dispatch("Excel.Application") > > I get the same com_error. It works on other Win32 machines, and > has worked on this one before, but now apparently something is > wrong. I reinstalled ActivePython, but still the same problem. > Could it be something in the registry? Pardon me for asking the bleeding obvious, but does that machine have Excel installed? -Andrew. From ishank_jain@hotmail.com Tue Jul 16 18:46:46 2002 From: ishank_jain@hotmail.com (Ishank Jain) Date: Tue, 16 Jul 2002 17:46:46 +0000 Subject: [python-win32] Problems embedding in C++ Message-ID: Hi, I have been trying to run a simple python file from C++ using the PyRun_SimpleFile C api call. Let the file I need to run be demo.py. If the demo.py contains simple python commands such as: print "Hello World" my program works fine. But when i try to use something like: import win32com print "Hello World" it gives me an error saying that it cannot find the win32api module. i checked the sys.path and it has the required path entries. also if i run the demo.py file using the python win gui then it runs correctly. only when i run the file using the PyRun_SimpleFile call, it fails. here is the traceback of the error: ----------------------------- Traceback (most recent call last): File "..\hello.py", line 15, in ? import win32com File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in ? import win32api, sys ImportError: No module named win32api [3929 refs] ----------------------------- any help would be appreciated. Ishank Jain ----------------------------------------------- Graduate Student Computer Engeering University of Minnesota, Twin Cities Voice: (Res) 612-331-9696 (Off) 612-626-0276 Email: ishank_jain@hotmail.com ----------------------------------------------- _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From jjorgensen@Tallan.com Tue Jul 16 19:24:03 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Tue, 16 Jul 2002 14:24:03 -0400 Subject: [python-win32] Problems embedding in C++ Message-ID: SG93IGRpZCB5b3UgY2hlY2sgc3lzLnBhdGg/IERpZCB5b3UgdXNlIFB5UnVuX1NpbXBsZUZpbGUg dG8gcnVuIHRoZSBzY3JpcHQ6DQogDQppbXBvcnQgc3lzDQpwcmludCBzeXMucGF0aA0KIA0KPyAN Cg0KCS0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tIA0KCUZyb206IElzaGFuayBKYWluIFttYWls dG86aXNoYW5rX2phaW5AaG90bWFpbC5jb21dIA0KCVNlbnQ6IFR1ZSA3LzE2LzIwMDIgMTI6NDYg UE0gDQoJVG86IHB5dGhvbi13aW4zMkBweXRob24ub3JnIA0KCUNjOiANCglTdWJqZWN0OiBbcHl0 aG9uLXdpbjMyXSBQcm9ibGVtcyBlbWJlZGRpbmcgaW4gQysrDQoJDQoJDQoNCglIaSwNCgkNCglJ IGhhdmUgYmVlbiB0cnlpbmcgdG8gcnVuIGEgc2ltcGxlIHB5dGhvbiBmaWxlIGZyb20gQysrIHVz aW5nIHRoZQ0KCVB5UnVuX1NpbXBsZUZpbGUgQyBhcGkgY2FsbC4NCgkNCglMZXQgdGhlIGZpbGUg SSBuZWVkIHRvIHJ1biBiZSBkZW1vLnB5Lg0KCUlmIHRoZSBkZW1vLnB5IGNvbnRhaW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0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tDQoJDQoJYW55IGhlbHAgd291bGQgYmUgYXBwcmVjaWF0ZWQuDQoJDQoJ SXNoYW5rIEphaW4NCgktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLQ0KCUdyYWR1YXRlIFN0dWRlbnQNCglDb21wdXRlciBFbmdlZXJpbmcNCglVbml2ZXJzaXR5 IG9mIE1pbm5lc290YSwgVHdpbiBDaXRpZXMNCglWb2ljZTogKFJlcykgNjEyLTMzMS05Njk2IChP ZmYpIDYxMi02MjYtMDI3Ng0KCUVtYWlsOiBpc2hhbmtfamFpbkBob3RtYWlsLmNvbQ0KCS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoJDQoJX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18N CglTZW5kIGFuZCByZWNlaXZlIEhvdG1haWwgb24geW91ciBtb2JpbGUgZGV2aWNlOiBodHRwOi8v bW9iaWxlLm1zbi5jb20NCgkNCgkNCgkNCglfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXw0KCVB5dGhvbi13aW4zMiBtYWlsaW5nIGxpc3QNCglQeXRob24td2lu MzJAcHl0aG9uLm9yZw0KCWh0dHA6Ly9tYWlsLnB5dGhvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9w eXRob24td2luMzINCgkNCg0K From ishank_jain@hotmail.com Tue Jul 16 19:29:55 2002 From: ishank_jain@hotmail.com (Ishank Jain) Date: Tue, 16 Jul 2002 18:29:55 +0000 Subject: [python-win32] Problems embedding in C++ Message-ID: yes, thats how i checked the sys.path >From: "Jorgensen, Jens" >To: "Ishank Jain" , >Subject: RE: [python-win32] Problems embedding in C++ >Date: Tue, 16 Jul 2002 14:24:03 -0400 > >How did you check sys.path? Did you use PyRun_SimpleFile to run the script: > >import sys >print sys.path > >? > > -----Original Message----- > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > Sent: Tue 7/16/2002 12:46 PM > To: python-win32@python.org > Cc: > Subject: [python-win32] Problems embedding in C++ > > > > Hi, > > I have been trying to run a simple python file from C++ using the > PyRun_SimpleFile C api call. > > Let the file I need to run be demo.py. > If the demo.py contains simple python commands such as: > > print "Hello World" > > my program works fine. But when i try to use something like: > > import win32com > print "Hello World" > > it gives me an error saying that it cannot find the win32api module. i > checked the sys.path and it has the required path entries. > > also if i run the demo.py file using the python win gui then it runs > correctly. only when i run the file using the PyRun_SimpleFile call, it > fails. > > here is the traceback of the error: > ----------------------------- > Traceback (most recent call last): > File "..\hello.py", line 15, in ? > import win32com > File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in ? > import win32api, sys > ImportError: No module named win32api > [3929 refs] > ----------------------------- > > any help would be appreciated. > > Ishank Jain > ----------------------------------------------- > Graduate Student > Computer Engeering > University of Minnesota, Twin Cities > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > Email: ishank_jain@hotmail.com > ----------------------------------------------- > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > _______________________________________________ > Python-win32 mailing list > Python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > > Ishank Jain ----------------------------------------------- Graduate Student Computer Engeering University of Minnesota, Twin Cities Voice: (Res) 612-331-9696 (Off) 612-626-0276 Email: ishank_jain@hotmail.com ----------------------------------------------- _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com From ishank_jain@hotmail.com Tue Jul 16 20:24:00 2002 From: ishank_jain@hotmail.com (Ishank Jain) Date: Tue, 16 Jul 2002 19:24:00 +0000 Subject: [python-win32] Problems embedding in C++ Message-ID: i called the following file: import sys try : import win32com except Exception, e: print sys.path print e i got the following output: ['c:\\python22', 'c:\\python22\\include', 'c:\\python22\\libs', 'c:\\python22\\d lls', 'c:\\python22\\lib', 'c:\\python22\\lib\\site-packages', 'c:\\python22\\li b\\site-packages\\win32', 'c:\\python22\\lib\\site-packages\\win32com', 'c:\\pyt hon22\\lib\\site-packages\\win32comext', 'C:\\Python22\\lib\\site-packages\\Pyth onwin', 'C:\\Python22\\lib\\site-packages\\win32\\lib', 'C:\\Python22\\Lib\\lib- tk', 'D:\\Dev\\PythonScriptWrapper\\Debug'] No module named win32api [3514 refs] so the exception did occur but as you can see the sys.path includes the win32 path where win32api.pyd is stored. so ideally it should be able to find the file. -ishank >From: "Jorgensen, Jens" >To: "Ishank Jain" , >Subject: RE: [python-win32] Problems embedding in C++ >Date: Tue, 16 Jul 2002 15:06:05 -0400 > >I wonder if the win32com module is somehow screwing with the path. Did you >try: > >import sys.path >try : > import win32com >except Exception, e : > print sys.path > > > > -----Original Message----- > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > Sent: Tue 7/16/2002 1:29 PM > To: Jorgensen, Jens; python-win32@python.org > Cc: > Subject: RE: [python-win32] Problems embedding in C++ > > > > yes, thats how i checked the sys.path > > > >From: "Jorgensen, Jens" > >To: "Ishank Jain" , > >Subject: RE: [python-win32] Problems embedding in C++ > >Date: Tue, 16 Jul 2002 14:24:03 -0400 > > > >How did you check sys.path? Did you use PyRun_SimpleFile to run the >script: > > > >import sys > >print sys.path > > > >? > > > > -----Original Message----- > > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > > Sent: Tue 7/16/2002 12:46 PM > > To: python-win32@python.org > > Cc: > > Subject: [python-win32] Problems embedding in C++ > > > > > > > > Hi, > > > > I have been trying to run a simple python file from C++ using the > > PyRun_SimpleFile C api call. > > > > Let the file I need to run be demo.py. > > If the demo.py contains simple python commands such as: > > > > print "Hello World" > > > > my program works fine. But when i try to use something like: > > > > import win32com > > print "Hello World" > > > > it gives me an error saying that it cannot find the win32api >module. i > > checked the sys.path and it has the required path entries. > > > > also if i run the demo.py file using the python win gui then it >runs > > correctly. only when i run the file using the PyRun_SimpleFile >call, it > > fails. > > > > here is the traceback of the error: > > ----------------------------- > > Traceback (most recent call last): > > File "..\hello.py", line 15, in ? > > import win32com > > File "C:\Python22\lib\site-packages\win32com\__init__.py", line >5, in ? > > import win32api, sys > > ImportError: No module named win32api > > [3929 refs] > > ----------------------------- > > > > any help would be appreciated. > > > > Ishank Jain > > ----------------------------------------------- > > Graduate Student > > Computer Engeering > > University of Minnesota, Twin Cities > > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > > Email: ishank_jain@hotmail.com > > ----------------------------------------------- > > > > _________________________________________________________________ > > Send and receive Hotmail on your mobile device: >http://mobile.msn.com > > > > > > > > _______________________________________________ > > Python-win32 mailing list > > Python-win32@python.org > > http://mail.python.org/mailman/listinfo/python-win32 > > > > > > > Ishank Jain > ----------------------------------------------- > Graduate Student > Computer Engeering > University of Minnesota, Twin Cities > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > Email: ishank_jain@hotmail.com > ----------------------------------------------- > > _________________________________________________________________ > Join the world’s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > Ishank Jain ----------------------------------------------- Graduate Student Computer Engeering University of Minnesota, Twin Cities Voice: (Res) 612-331-9696 (Off) 612-626-0276 Email: ishank_jain@hotmail.com ----------------------------------------------- _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From jjorgensen@Tallan.com Tue Jul 16 20:06:05 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Tue, 16 Jul 2002 15:06:05 -0400 Subject: [python-win32] Problems embedding in C++ Message-ID: SSB3b25kZXIgaWYgdGhlIHdpbjMyY29tIG1vZHVsZSBpcyBzb21laG93IHNjcmV3aW5nIHdpdGgg dGhlIHBhdGguIERpZCB5b3UgdHJ5Og0KIA0KaW1wb3J0IHN5cy5wYXRoDQp0cnkgOg0KICAgIGlt cG9ydCB3aW4zMmNvbQ0KZXhjZXB0IEV4Y2VwdGlvbiwgZSA6DQogICAgcHJpbnQgc3lzLnBhdGgN CiANCiANCg0KCS0tLS0tT3JpZ2luYWw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NCglodHRwOi8vd3d3LmhvdG1haWwuY29tDQoJDQoJDQoNCg== From jjorgensen@Tallan.com Tue Jul 16 21:45:57 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Tue, 16 Jul 2002 16:45:57 -0400 Subject: [python-win32] Problems embedding in C++ Message-ID: SG1tbS4gVGhhdCdzIHByZXR0eSB0b3VnaC4gVGhlIHBhdGggY2VydGFpbmx5IGxvb2tzIG9rLiBU aGUgY29tbWFuZC1saW5lIHB5dGhvbiBoYXMgdGhlICctdicgcGFyYW0gd2hpY2ggSSd2ZSBmb3Vu ZCB0byBiZSBoZWxwZnVsIGZvciBkZWJ1Z2dpbmcgbW9kdWxlIGxvYWRpbmcuIFBlcmhhcHMgdGhl cmUgaXMgYW4gZXF1aXZhbGVudCBpbiB0aGUgZW1iZWRkZWQgYXBpPw0KDQoJLS0tLS1PcmlnaW5h bCBNZXNzYWdlLS0tLS0gDQoJRnJvbTogSXNoYW5rIEphaW4gW21haWx0bzppc2hhbmtfamFpbkBo b3RtYWlsLmNvbV0gDQoJU2VudDogVHVlIDcvMTYvMjAwMiAyOjI0IFBNIA0KCVRvOiBKb3JnZW5z ZW4sIEplbnM7IHB5dGhvbi13aW4zMkBweXRob24ub3JnIA0KCUNjOiANCglTdWJqZWN0OiBSRTog W3B5dGhvbi13aW4zMl0gUHJvYmxlbXMgZW1iZWRkaW5nIGluIEMrKw0KCQ0KCQ0KDQoJaSBjYWxs ZWQgdGhlIGZvbGxvd2luZyBmaWxlOg0KCQ0KCWltcG9ydCBzeXMNCgl0cnkgOg0KCSAgICBpbXBv cnQgd2luMzJjb20NCglleGNlcHQgRXhjZXB0aW9uLCBlOg0KCSAgICBwcmludCBzeXMucGF0aA0K CSAgICBwcmludCBlDQoJDQoJaSBnb3QgdGhlIGZvbGxvd2luZyBvdXRwdXQ6DQoJDQoJWydjOlxc cHl0aG9uMjInLCAnYzpcXHB5dGhvbjIyXFxpbmNsdWRlJywgJ2M6XFxweXRob24yMlxcbG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bQ0KCT4gICAgICAgPiAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KCT4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICBfX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fXw0KCT4gICAgICAgPiAgICAgICBTZW5kIGFuZCByZWNlaXZlIEhvdG1haWwgb24geW91ciBt b2JpbGUgZGV2aWNlOg0KCT5odHRwOi8vbW9iaWxlLm1zbi5jb20NCgk+ICAgICAgID4NCgk+ICAg ICAgID4NCgk+ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18NCgk+ICAgICAgID4gICAgICAgUHl0aG9uLXdpbjMy IG1haWxpbmcgbGlzdA0KCT4gICAgICAgPiAgICAgICBQeXRob24td2luMzJAcHl0aG9uLm9yZw0K CT4gICAgICAgPiAgICAgICBodHRwOi8vbWFpbC5weXRob24ub3JnL21haWxtYW4vbGlzdGluZm8v cHl0aG9uLXdpbjMyDQoJPiAgICAgICA+DQoJPiAgICAgICA+DQoJPg0KCT4NCgk+ICAgICAgIElz aGFuayBKYWluDQoJPiAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLQ0KCT4gICAgICAgR3JhZHVhdGUgU3R1ZGVudA0KCT4gICAgICAgQ29tcHV0ZXIg RW5nZWVyaW5nDQoJPiAgICAgICBVbml2ZXJzaXR5IG9mIE1pbm5lc290YSwgVHdpbiBDaXRpZXMN Cgk+ICAgICAgIFZvaWNlOiAoUmVzKSA2MTItMzMxLTk2OTYgKE9mZikgNjEyLTYyNi0wMjc2DQoJ PiAgICAgICBFbWFpbDogaXNoYW5rX2phaW5AaG90bWFpbC5jb20NCgk+ICAgICAgIC0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoJPg0KCT4gICAgICAgX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18NCgk+ICAgICAgIEpvaW4gdGhlIHdvcmxkw6LigqzihKJzIGxhcmdlc3QgZS1tYWlsIHNl cnZpY2Ugd2l0aCBNU04gSG90bWFpbC4NCgk+ICAgICAgIGh0dHA6Ly93d3cuaG90bWFpbC5jb20N Cgk+DQoJPg0KCT4NCgkNCgkNCglJc2hhbmsgSmFpbg0KCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoJR3JhZHVhdGUgU3R1ZGVudA0KCUNvbXB1dGVyIEVu Z2VlcmluZw0KCVVuaXZlcnNpdHkgb2YgTWlubmVzb3RhLCBUd2luIENpdGllcw0KCVZvaWNlOiAo UmVzKSA2MTItMzMxLTk2OTYgKE9mZikgNjEyLTYyNi0wMjc2DQoJRW1haWw6IGlzaGFua19qYWlu QGhvdG1haWwuY29tDQoJLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0NCgkNCglfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fXw0KCUNoYXQgd2l0aCBmcmllbmRzIG9ubGluZSwgdHJ5IE1TTiBN ZXNzZW5nZXI6IGh0dHA6Ly9tZXNzZW5nZXIubXNuLmNvbQ0KCQ0KCQ0KDQo= From ishank_jain@hotmail.com Tue Jul 16 22:02:30 2002 From: ishank_jain@hotmail.com (Ishank Jain) Date: Tue, 16 Jul 2002 21:02:30 +0000 Subject: [python-win32] Problems embedding in C++ Message-ID: i noticed one thing. the embedded interpreter is failing to import extensible modules only (with extension .pyd). it is successfully able to run files with other modules (.py or .pyc). does the embedded interprester runs in an sandboxed environment where it is not allowed to access win32 extensions? i couldn't find -v option for an embedded interpreter but thanks for that info. i didnt knew that option. -ishank >From: "Jorgensen, Jens" >To: "Ishank Jain" , >Subject: RE: [python-win32] Problems embedding in C++ >Date: Tue, 16 Jul 2002 16:45:57 -0400 > >Hmmm. That's pretty tough. The path certainly looks ok. The command-line >python has the '-v' param which I've found to be helpful for debugging >module loading. Perhaps there is an equivalent in the embedded api? > > -----Original Message----- > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > Sent: Tue 7/16/2002 2:24 PM > To: Jorgensen, Jens; python-win32@python.org > Cc: > Subject: RE: [python-win32] Problems embedding in C++ > > > > i called the following file: > > import sys > try : > import win32com > except Exception, e: > print sys.path > print e > > i got the following output: > > ['c:\\python22', 'c:\\python22\\include', 'c:\\python22\\libs', > 'c:\\python22\\d > lls', 'c:\\python22\\lib', 'c:\\python22\\lib\\site-packages', > 'c:\\python22\\li > b\\site-packages\\win32', 'c:\\python22\\lib\\site-packages\\win32com', > 'c:\\pyt > hon22\\lib\\site-packages\\win32comext', > 'C:\\Python22\\lib\\site-packages\\Pyth > onwin', 'C:\\Python22\\lib\\site-packages\\win32\\lib', > 'C:\\Python22\\Lib\\lib- > tk', 'D:\\Dev\\PythonScriptWrapper\\Debug'] > No module named win32api > [3514 refs] > > so the exception did occur but as you can see the sys.path includes the > win32 path where win32api.pyd is stored. so ideally it should be able to > find the file. > > -ishank > > > >From: "Jorgensen, Jens" > >To: "Ishank Jain" , > >Subject: RE: [python-win32] Problems embedding in C++ > >Date: Tue, 16 Jul 2002 15:06:05 -0400 > > > >I wonder if the win32com module is somehow screwing with the path. Did >you > >try: > > > >import sys.path > >try : > > import win32com > >except Exception, e : > > print sys.path > > > > > > > > -----Original Message----- > > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > > Sent: Tue 7/16/2002 1:29 PM > > To: Jorgensen, Jens; python-win32@python.org > > Cc: > > Subject: RE: [python-win32] Problems embedding in C++ > > > > > > > > yes, thats how i checked the sys.path > > > > > > >From: "Jorgensen, Jens" > > >To: "Ishank Jain" , > > > >Subject: RE: [python-win32] Problems embedding in C++ > > >Date: Tue, 16 Jul 2002 14:24:03 -0400 > > > > > >How did you check sys.path? Did you use PyRun_SimpleFile to run >the > >script: > > > > > >import sys > > >print sys.path > > > > > >? > > > > > > -----Original Message----- > > > From: Ishank Jain [mailto:ishank_jain@hotmail.com] > > > Sent: Tue 7/16/2002 12:46 PM > > > To: python-win32@python.org > > > Cc: > > > Subject: [python-win32] Problems embedding in C++ > > > > > > > > > > > > Hi, > > > > > > I have been trying to run a simple python file from C++ >using the > > > PyRun_SimpleFile C api call. > > > > > > Let the file I need to run be demo.py. > > > If the demo.py contains simple python commands such as: > > > > > > print "Hello World" > > > > > > my program works fine. But when i try to use something >like: > > > > > > import win32com > > > print "Hello World" > > > > > > it gives me an error saying that it cannot find the >win32api > >module. i > > > checked the sys.path and it has the required path entries. > > > > > > also if i run the demo.py file using the python win gui >then it > >runs > > > correctly. only when i run the file using the >PyRun_SimpleFile > >call, it > > > fails. > > > > > > here is the traceback of the error: > > > ----------------------------- > > > Traceback (most recent call last): > > > File "..\hello.py", line 15, in ? > > > import win32com > > > File >"C:\Python22\lib\site-packages\win32com\__init__.py", line > >5, in ? > > > import win32api, sys > > > ImportError: No module named win32api > > > [3929 refs] > > > ----------------------------- > > > > > > any help would be appreciated. > > > > > > Ishank Jain > > > ----------------------------------------------- > > > Graduate Student > > > Computer Engeering > > > University of Minnesota, Twin Cities > > > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > > > Email: ishank_jain@hotmail.com > > > ----------------------------------------------- > > > > > > >_________________________________________________________________ > > > Send and receive Hotmail on your mobile device: > >http://mobile.msn.com > > > > > > > > > > > > _______________________________________________ > > > Python-win32 mailing list > > > Python-win32@python.org > > > http://mail.python.org/mailman/listinfo/python-win32 > > > > > > > > > > > > Ishank Jain > > ----------------------------------------------- > > Graduate Student > > Computer Engeering > > University of Minnesota, Twin Cities > > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > > Email: ishank_jain@hotmail.com > > ----------------------------------------------- > > > > _________________________________________________________________ > > Join the world’s largest e-mail service with MSN Hotmail. > > http://www.hotmail.com > > > > > > > > > Ishank Jain > ----------------------------------------------- > Graduate Student > Computer Engeering > University of Minnesota, Twin Cities > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > Email: ishank_jain@hotmail.com > ----------------------------------------------- > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > Ishank Jain ----------------------------------------------- Graduate Student Computer Engeering University of Minnesota, Twin Cities Voice: (Res) 612-331-9696 (Off) 612-626-0276 Email: ishank_jain@hotmail.com ----------------------------------------------- _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From jjorgensen@Tallan.com Tue Jul 16 22:42:54 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Tue, 16 Jul 2002 17:42:54 -0400 Subject: [python-win32] Problems embedding in C++ Message-ID: SSBjYW4ndCB0aGluayBvZiBhbnkgZGltZW5zaW9uIG9mIE5UIHNlY3VyaXR5IHRoYXQgd291bGQg cmVzdHJpY3QgYWNjZXNzIGJhc2VkIG9uIGZpbGUgZXh0ZW5zaW9uLiBBbm90aGVyIGxvbmcgc2hv dWxkIGNvdWxkIGJlIGEgY2FzZS1zZW5zaXRpdml0eSBwcm9ibGVtLiBJIGRvbid0IGtub3cgaG93 IHB5dGhvbiBoYW5kbGVzIHRoaXMgYnV0IHBlcmhhcHMgdGhpcyBjb3VsZCBiZSBhIGRpZmZpY3Vs dHk/IEkgY2FuJ3QgdGhpbmsgb2Ygd2h5IGl0IHdvdWxkIGJlIHNpbmNlIHRoZSBXaW4zMiBmaWxl IG9wZXJhdGlvbnMgd2lsbCBmaW5kIHRoZSBmaWxlIGNvcnJlY3RseS4gUGVyaGFwcyBpZiBweXRo b24gd2FzIGxpc3RpbmcgdGhlIGRpcmVjdG9yeSBhbmQgdGhlbiBsb29raW5nIGF0IHRoZSBmaWxl cyBpbiBpdCBpdCBtaWdodCBt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gIHBy aW50IHN5cy5wYXRoDQoJPiAgICAgICA+DQoJPiAgICAgICA+DQoJPiAgICAgICA+DQoJPiAgICAg ICA+ICAgICAgIC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQoJPiAgICAgICA+ICAgICAgIEZy b206IElzaGFuayBKYWluIFttYWlsdG86aXNoYW5rX2phaW5AaG90bWFpbC5jb21dDQoJPiAgICAg ICA+ICAgICAgIFNlbnQ6IFR1ZSA3LzE2LzIwMDIgMToyOSBQTQ0KCT4gICAgICAgPiAgICAgICBU bzogSm9yZ2Vuc2VuLCBKZW5zOyBweXRob24td2luMzJAcHl0aG9uLm9yZw0KCT4gICAgICAgPiAg ICAgICBDYzoNCgk+ICAgICAgID4gICAgICAgU3ViamVjdDogUkU6IFtweXRob24td2luMzJdIFBy b2JsZW1zIGVtYmVkZGluZyBpbiBDKysNCgk+ICAgICAgID4NCgk+ICAgICAgID4NCgk+ICAgICAg ID4NCgk+ICAgICAgID4gICAgICAgeWVzLCB0aGF0cyBob3cgaSBjaGVja2VkIHRoZSBzeXMucGF0 aA0KCT4gICAgICAgPg0KCT4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICA+RnJvbTogIkpvcmdl bnNlbiwgSmVucyIgPGpqb3JnZW5zZW5AVGFsbGFuLmNvbT4NCgk+ICAgICAgID4gICAgICAgPlRv OiAiSXNoYW5rIEphaW4iIDxpc2hhbmtfamFpbkBob3RtYWlsLmNvbT4sDQoJPjxweXRob24td2lu MzJAcHl0aG9uLm9yZz4NCgk+ICAgICAgID4gICAgICAgPlN1YmplY3Q6IFJFOiBbcHl0aG9uLXdp bjMyXSBQcm9ibGVtcyBlbWJlZGRpbmcgaW4gQysrDQoJPiAgICAgICA+ICAgICAgID5EYXRlOiBU dWUsIDE2IEp1bCAyMDAyIDE0OjI0OjAzIC0wNDAwDQoJPiAgICAgICA+ICAgICAgID4NCgk+ICAg ICAgID4gICAgICAgPkhvdyBkaWQgeW91IGNoZWNrIHN5cy5wYXRoPyBEaWQgeW91IHVzZSBQeVJ1 bl9TaW1wbGVGaWxlIHRvIHJ1bg0KCT50aGUNCgk+ICAgICAgID5zY3JpcHQ6DQoJPiAgICAgICA+ ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgPmltcG9ydCBzeXMNCgk+ICAgICAgID4gICAgICAg PnByaW50IHN5cy5wYXRoDQoJPiAgICAgICA+ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgPj8N Cgk+ICAgICAgID4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIC0tLS0tT3JpZ2lu YWwgTWVzc2FnZS0tLS0tDQoJPiAgICAgICA+ICAgICAgID4gICAgICAgRnJvbTogSXNoYW5rIEph aW4gW21haWx0bzppc2hhbmtfamFpbkBob3RtYWlsLmNvbV0NCgk+ICAgICAgID4gICAgICAgPiAg ICAgICBTZW50OiBUdWUgNy8xNi8yMDAyIDEyOjQ2IFBNDQoJPiAgICAgICA+ICAgICAgID4gICAg ICAgVG86IHB5dGhvbi13aW4zMkBweXRob24ub3JnDQoJPiAgICAgICA+ICAgICAgID4gICAgICAg Q2M6DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgU3ViamVjdDogW3B5dGhvbi13aW4zMl0gUHJv YmxlbXMgZW1iZWRkaW5nIGluIEMrKw0KCT4gICAgICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAg ICAgID4NCgk+ICAgICAgID4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIEhpLA0K CT4gICAgICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgSSBoYXZlIGJlZW4g dHJ5aW5nIHRvIHJ1biBhIHNpbXBsZSBweXRob24gZmlsZSBmcm9tIEMrKw0KCT51c2luZyB0aGUN Cgk+ICAgICAgID4gICAgICAgPiAgICAgICBQeVJ1bl9TaW1wbGVGaWxlIEMgYXBpIGNhbGwuDQoJ PiAgICAgICA+ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgPiAgICAgICBMZXQgdGhlIGZpbGUg SSBuZWVkIHRvIHJ1biBiZSBkZW1vLnB5Lg0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIElmIHRo ZSBkZW1vLnB5IGNvbnRhaW5zIHNpbXBsZSBweXRob24gY29tbWFuZHMgc3VjaCBhczoNCgk+ICAg ICAgID4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIHByaW50ICJIZWxsbyBXb3Js ZCINCgk+ICAgICAgID4gICAgICAgPg0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIG15IHByb2dy YW0gd29ya3MgZmluZS4gQnV0IHdoZW4gaSB0cnkgdG8gdXNlIHNvbWV0aGluZw0KCT5saWtlOg0K CT4gICAgICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgaW1wb3J0IHdpbjMy Y29tDQoJPiAgICAgICA+ICAgICAgID4gICAgICAgcHJpbnQgIkhlbGxvIFdvcmxkIg0KCT4gICAg ICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgaXQgZ2l2ZXMgbWUgYW4gZXJy b3Igc2F5aW5nIHRoYXQgaXQgY2Fubm90IGZpbmQgdGhlDQoJPndpbjMyYXBpDQoJPiAgICAgICA+ bW9kdWxlLiBpDQoJPiAgICAgICA+ICAgICAgID4gICAgICAgY2hlY2tlZCB0aGUgc3lzLnBhdGgg YW5kIGl0IGhhcyB0aGUgcmVxdWlyZWQgcGF0aCBlbnRyaWVzLg0KCT4gICAgICAgPiAgICAgICA+ DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgYWxzbyBpZiBpIHJ1biB0aGUgZGVtby5weSBmaWxl IHVzaW5nIHRoZSBweXRob24gd2luIGd1aQ0KCT50aGVuIGl0DQoJPiAgICAgICA+cnVucw0KCT4g ICAgICAgPiAgICAgICA+ICAgICAgIGNvcnJlY3RseS4gb25seSB3aGVuIGkgcnVuIHRoZSBmaWxl IHVzaW5nIHRoZQ0KCT5QeVJ1bl9TaW1wbGVGaWxlDQoJPiAgICAgICA+Y2FsbCwgaXQNCgk+ICAg ICAgID4gICAgICAgPiAgICAgICBmYWlscy4NCgk+ICAgICAgID4gICAgICAgPg0KCT4gICAgICAg PiAgICAgICA+ICAgICAgIGhlcmUgaXMgdGhlIHRyYWNlYmFjayBvZiB0aGUgZXJyb3I6DQoJPiAg ICAgICA+ICAgICAgID4gICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCgk+ICAg ICAgID4gICAgICAgPiAgICAgICBUcmFjZWJhY2sgKG1vc3QgcmVjZW50IGNhbGwgbGFzdCk6DQoJ PiAgICAgICA+ICAgICAgID4gICAgICAgICBGaWxlICIuLlxoZWxsby5weSIsIGxpbmUgMTUsIGlu ID8NCgk+ICAgICAgID4gICAgICAgPiAgICAgICAgICAgaW1wb3J0IHdpbjMyY29tDQoJPiAgICAg ICA+ICAgICAgID4gICAgICAgICBGaWxlDQoJPiJDOlxQeXRob24yMlxsaWJcc2l0ZS1wYWNrYWdl c1x3aW4zMmNvbVxfX2luaXRfXy5weSIsIGxpbmUNCgk+ICAgICAgID41LCBpbiA/DQoJPiAgICAg ICA+ICAgICAgID4gICAgICAgICAgIGltcG9ydCB3aW4zMmFwaSwgc3lzDQoJPiAgICAgICA+ICAg ICAgID4gICAgICAgSW1wb3J0RXJyb3I6IE5vIG1vZHVsZSBuYW1lZCB3aW4zMmFwaQ0KCT4gICAg ICAgPiAgICAgICA+ICAgICAgIFszOTI5IHJlZnNdDQoJPiAgICAgICA+ICAgICAgID4gICAgICAg LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCgk+ICAgICAgID4gICAgICAgPg0KCT4gICAg ICAgPiAgICAgICA+ICAgICAgIGFueSBoZWxwIHdvdWxkIGJlIGFwcHJlY2lhdGVkLg0KCT4gICAg ICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgSXNoYW5rIEphaW4NCgk+ICAg ICAgID4gICAgICAgPiAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLQ0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIEdyYWR1YXRlIFN0dWRlbnQNCgk+ ICAgICAgID4gICAgICAgPiAgICAgICBDb21wdXRlciBFbmdlZXJpbmcNCgk+ICAgICAgID4gICAg ICAgPiAgICAgICBVbml2ZXJzaXR5IG9mIE1pbm5lc290YSwgVHdpbiBDaXRpZXMNCgk+ICAgICAg ID4gICAgICAgPiAgICAgICBWb2ljZTogKFJlcykgNjEyLTMzMS05Njk2IChPZmYpIDYxMi02MjYt MDI3Ng0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIEVtYWlsOiBpc2hhbmtfamFpbkBob3RtYWls LmNvbQ0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoJPiAgICAgICA+ICAgICAgID4NCgk+ICAgICAgID4gICAg ICAgPiAgICAgIA0KCT5fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fXw0KCT4gICAgICAgPiAgICAgICA+ICAgICAgIFNlbmQgYW5k IHJlY2VpdmUgSG90bWFpbCBvbiB5b3VyIG1vYmlsZSBkZXZpY2U6DQoJPiAgICAgICA+aHR0cDov L21vYmlsZS5tc24uY29tDQoJPiAgICAgICA+ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgPg0K CT4gICAgICAgPiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgID4gICAgICAgX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCgk+ICAgICAgID4gICAgICAgPiAg ICAgICBQeXRob24td2luMzIgbWFpbGluZyBsaXN0DQoJPiAgICAgICA+ICAgICAgID4gICAgICAg UHl0aG9uLXdpbjMyQHB5dGhvbi5vcmcNCgk+ICAgICAgID4gICAgICAgPiAgICAgICBodHRwOi8v bWFpbC5weXRob24ub3JnL21haWxtYW4vbGlzdGluZm8vcHl0aG9uLXdpbjMyDQoJPiAgICAgICA+ ICAgICAgID4NCgk+ICAgICAgID4gICAgICAgPg0KCT4gICAgICAgPg0KCT4gICAgICAgPg0KCT4g ICAgICAgPiAgICAgICBJc2hhbmsgSmFpbg0KCT4gICAgICAgPiAgICAgICAtLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KCT4gICAgICAgPiAgICAgICBHcmFk dWF0ZSBTdHVkZW50DQoJPiAgICAgICA+ICAgICAgIENvbXB1dGVyIEVuZ2VlcmluZw0KCT4gICAg ICAgPiAgICAgICBVbml2ZXJzaXR5IG9mIE1pbm5lc290YSwgVHdpbiBDaXRpZXMNCgk+ICAgICAg ID4gICAgICAgVm9pY2U6IChSZXMpIDYxMi0zMzEtOTY5NiAoT2ZmKSA2MTItNjI2LTAyNzYNCgk+ ICAgICAgID4gICAgICAgRW1haWw6IGlzaGFua19qYWluQGhvdG1haWwuY29tDQoJPiAgICAgICA+ ICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQoJ PiAgICAgICA+DQoJPiAgICAgICA+ICAgICAgIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQoJPiAgICAgICA+ICAgICAgIEpv aW4gdGhlIHdvcmxkw4PCosOi4oCawqzDouKAnsKicyBsYXJnZXN0IGUtbWFpbCBzZXJ2aWNlIHdp dGggTVNOIEhvdG1haWwuDQoJPiAgICAgICA+ICAgICAgIGh0dHA6Ly93d3cuaG90bWFpbC5jb20N Cgk+ICAgICAgID4NCgk+ICAgICAgID4NCgk+ICAgICAgID4NCgk+DQoJPg0KCT4gICAgICAgSXNo YW5rIEphaW4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19fX19fX19fX18NCglDaGF0IHdp dGggZnJpZW5kcyBvbmxpbmUsIHRyeSBNU04gTWVzc2VuZ2VyOiBodHRwOi8vbWVzc2VuZ2VyLm1z bi5jb20NCgkNCgkNCg0K From mhammond@skippinet.com.au Wed Jul 17 10:40:37 2002 From: mhammond@skippinet.com.au (Mark Hammond) Date: Wed, 17 Jul 2002 19:40:37 +1000 Subject: [python-win32] Problems embedding in C++ In-Reply-To: Message-ID: Do any non-Win32 .pyd files import? If so, my guess is that a dependent DLL can not be found. Is pywintypesxx.dll on your PATH (not PYTHONPATH)? Re "-v" for embedded Python - set Py_VerboseFlag from your C++ code. Mark. > -----Original Message----- > From: python-win32-admin@python.org > [mailto:python-win32-admin@python.org]On Behalf Of Ishank Jain > Sent: Wednesday, 17 July 2002 3:47 AM > To: python-win32@python.org > Subject: [python-win32] Problems embedding in C++ > > > Hi, > > I have been trying to run a simple python file from C++ using the > PyRun_SimpleFile C api call. > > Let the file I need to run be demo.py. > If the demo.py contains simple python commands such as: > > print "Hello World" > > my program works fine. But when i try to use something like: > > import win32com > print "Hello World" > > it gives me an error saying that it cannot find the win32api module. i > checked the sys.path and it has the required path entries. > > also if i run the demo.py file using the python win gui then it runs > correctly. only when i run the file using the PyRun_SimpleFile call, it > fails. > > here is the traceback of the error: > ----------------------------- > Traceback (most recent call last): > File "..\hello.py", line 15, in ? > import win32com > File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in ? > import win32api, sys > ImportError: No module named win32api > [3929 refs] > ----------------------------- > > any help would be appreciated. > > Ishank Jain > ----------------------------------------------- > Graduate Student > Computer Engeering > University of Minnesota, Twin Cities > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > Email: ishank_jain@hotmail.com > ----------------------------------------------- > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > _______________________________________________ > Python-win32 mailing list > Python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 From unifoam@total.net Wed Jul 17 16:22:27 2002 From: unifoam@total.net (George Vestergom) Date: Wed, 17 Jul 2002 11:22:27 -0400 Subject: [python-win32] Re: Problems using JET SQL CREATE TABLE statement References: <3D3325CC.8AE9B117@total.net> Message-ID: <3D358BB3.46A48333@total.net> 2002 July 17, Wednesday Problem: When trying to use the CREATE TABLE statement (JET SQL), the table is created but does not show up in the Database Window in ACCESS. Enumerating the TableDefs collection in Python shows that the table has been added, but doesn't show up when I run ACCESS. Refreshing the window doesn't do anything. When the same statement is performed in a VBA Module, the table is created and shows up in the Database Window. Assumptions: 1. ACCESS 2000 / DAO 3.6 2. Python 2.2 3. win32all-148 4. MakePy on DAO 3.6 Object Library Example Session using Pythonwin (just to illustrate what I've done >>> # open a database and print out objects. >>> # database contains 2 tables >>> from win32com.client import Dispatch, constants >>> dbe = Dispatch('DAO.DBEngine.36') >>> wrk = dbe.Workspaces(0) >>> db = wrk.OpenDatabase('pydb.mdb') >>> dbe >>> wrk >>> db >>> # enumerate TableDefs (system tables not shown) will print 2 tables currently in the database: >>> tbldefs = db.TableDefs >>> for tbl in tbldefs: print tbl.Name tblEx01 tblEx02 >>> # now lets create a new table using JET SQL >>> txtsql = 'CREATE TABLE tblNewTable (Name CHAR(40), City CHAR(40) );' >>> db.Execute(txtsql) Everything's okay here, table is created, no problem. Now let's refresh TableDefs and print it out. >>> db.TableDefs.Refresh() >>> tbldefs = db.TableDefs >>> for tbl in tbldefs: print i.Name tblEx01 tblEx02 tblNewTable If I switch to ACCESS and refresh the Database Window, table tblNewTable is not included in the list. I've tried the following scenarios: 1. If I close both ACCESS and Pythonwin and re-open the file with ACCESS, the new table tblNewTable is not shown. 2. Closing ACCESS and running Pythonwin: table shows up in the TableDefs collection! 3. Closing Pythonwin and opening ACCESS: If I use the CREATE TABLE (from above) in a Sub procedure, using the SAME name, the table is created AND SHOWS UP IN THE DATABASE WINDOW! One would think an error would have been raised at this point. 4. Closing ACCESS and opening Pythonwin: I can add new records to this table using the following JET SQL INSERT statement: >>> r = 'INSERT INTO tblNewTable (Name, City) VALUES ("George", "Toronto");' >>> db.Execute(r) and will show up in Python. No data is shown in ACCESS, even if the table was first created using VBA in a module. It may not be too important of a problem since I haven't had any problem (so far) using DOA in Python. I just wanted to find out if JET SQL works the same way and apparently I've come across these "warts". Any ideas? George Vestergom From ishank_jain@hotmail.com Wed Jul 17 16:27:55 2002 From: ishank_jain@hotmail.com (Ishank Jain) Date: Wed, 17 Jul 2002 15:27:55 +0000 Subject: [python-win32] Problems embedding in C++ Message-ID: I re-installed Python and its windows extensions and this has seemed to solve the problem. It looks as if I had some compatibility problem between Python libraries. Also, Mark, I had the pywintypesxx.dll in the PATH but somehow the registry entry for it was missing. I think that was another problem and re-installing the extensions added back the registry entry. Thanks Mark and Jens. Will keep in touch. -Ishank >From: "Mark Hammond" >To: "Ishank Jain" >CC: >Subject: RE: [python-win32] Problems embedding in C++ >Date: Wed, 17 Jul 2002 19:40:37 +1000 > >Do any non-Win32 .pyd files import? If so, my guess is that a dependent >DLL >can not be found. Is pywintypesxx.dll on your PATH (not PYTHONPATH)? > >Re "-v" for embedded Python - set Py_VerboseFlag from your C++ code. > >Mark. > > > -----Original Message----- > > From: python-win32-admin@python.org > > [mailto:python-win32-admin@python.org]On Behalf Of Ishank Jain > > Sent: Wednesday, 17 July 2002 3:47 AM > > To: python-win32@python.org > > Subject: [python-win32] Problems embedding in C++ > > > > > > Hi, > > > > I have been trying to run a simple python file from C++ using the > > PyRun_SimpleFile C api call. > > > > Let the file I need to run be demo.py. > > If the demo.py contains simple python commands such as: > > > > print "Hello World" > > > > my program works fine. But when i try to use something like: > > > > import win32com > > print "Hello World" > > > > it gives me an error saying that it cannot find the win32api module. i > > checked the sys.path and it has the required path entries. > > > > also if i run the demo.py file using the python win gui then it runs > > correctly. only when i run the file using the PyRun_SimpleFile call, it > > fails. > > > > here is the traceback of the error: > > ----------------------------- > > Traceback (most recent call last): > > File "..\hello.py", line 15, in ? > > import win32com > > File "C:\Python22\lib\site-packages\win32com\__init__.py", line 5, in >? > > import win32api, sys > > ImportError: No module named win32api > > [3929 refs] > > ----------------------------- > > > > any help would be appreciated. > > > > Ishank Jain > > ----------------------------------------------- > > Graduate Student > > Computer Engeering > > University of Minnesota, Twin Cities > > Voice: (Res) 612-331-9696 (Off) 612-626-0276 > > Email: ishank_jain@hotmail.com > > ----------------------------------------------- > > > > _________________________________________________________________ > > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > > > > > _______________________________________________ > > Python-win32 mailing list > > Python-win32@python.org > > http://mail.python.org/mailman/listinfo/python-win32 Ishank Jain ----------------------------------------------- Graduate Student Computer Engeering University of Minnesota, Twin Cities Voice: (Res) 612-331-9696 (Off) 612-626-0276 Email: ishank_jain@hotmail.com ----------------------------------------------- _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From jjorgensen@Tallan.com Wed Jul 17 21:43:00 2002 From: jjorgensen@Tallan.com (Jorgensen, Jens) Date: Wed, 17 Jul 2002 16:43:00 -0400 Subject: [python-win32] Re: Problems using JET SQL CREATE TABLE statement Message-ID: R2VvcmdlLA0KIA0KQWx0aG91Z2ggSSBjYW4ndCBiZSBjZXJ0YWluIEknbSBnb2luZyB0byBndWVz cyB0aGF0IHRoZSBkaWZmZXJlbmNlcyBpbiBiZWhhdmlvciBiZXR3ZWVuIFB5dGhvbiBhbmQgVkJT IGFyZSBvY2N1cmluZyBiZWNhdXNlIHdoZW4geW91IGFyZSBleGVjdXRpbmcgdGhlIHN0YXRlbWVu dHMgaW4gUHl0aG9uIHRoZSBvYmplY3RzIGRvIG5vdCBnZXQgZGVsZXRlZCBhbmQgc29tZWhvdyB0 aGUgZGF0YSBpcyBub3QgYmVpbmcgd3JpdHRlbiB0aHJvdWdoIHRvIHRoZSBmaWxlLiBTb21lIG9m IHRoZSBzY2VuYXJpb3Mgc3VwcG9ydCB0aGlzIGFuZCBvdGhlcnMgY29udHJhZGljdCBpdCBidXQg SSBzdGlsbCBiZWxpZXZlIHRoaXMgaXMgdGhlIGNhc2UuIFNpb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ject: [python-win32] Re: Problems using JET SQL CREATE TABLE statem ent Message-ID: <8B823941A63BD611878500B0D0D1CCC4011DF078@exchange03.comp.pge.com> Hi George - I know the Access tables have a property that says whether or not they ar= e Visible in the database window. Maybe ADO does not do this by default?=20 I can't find the details of this, but it could be that you just need to somehow manipulate the extended properties of the table object and flip a switch. Probably ADOX is your best bet to get more control of the objects. Rob =20 -----Original Message----- From: Jorgensen, Jens [mailto:jjorgensen@Tallan.com] Sent: Wednesday, July 17, 2002 1:43 PM To: George Vestergom; python-win32@python.org Subject: RE: [python-win32] Re: Problems using JET SQL CREATE TABLE statement George, =20 Although I can't be certain I'm going to guess that the differences in behavior between Python and VBS are occuring because when you are executi= ng the statements in Python the objects do not get deleted and somehow the d= ata is not being written through to the file. Some of the scenarios support t= his and others contradict it but I still believe this is the case. Since the interface is COM the COM objects themselves don't know if python is calli= ng them or VBS is and the results should be no different. Try putting your statements into a .py file and running the scripts with python.exe rathen than pythonwin. Any difference observed then? =20 BTW I use ADO myself and manipulate Jet databases fairly often and at tim= es use Access in tandem and haven't seen any problems like this. You can cre= ate new Jet databases too, you just use ADOX. ADOX also let's you get lists o= f tables, etc. -----Original Message-----=20 From: George Vestergom [mailto:unifoam@total.net]=20 Sent: Wed 7/17/2002 10:22 AM=20 To: 'python-win32@python.org'=20 Cc:=20 Subject: [python-win32] Re: Problems using JET SQL CREATE TABLE statement =09 =09 2002 July 17, Wednesday =09 Problem: When trying to use the CREATE TABLE statement (JET SQL), the table is created but does not show up in the Database Window in ACCESS. Enumerating the TableDefs collection in Python shows that the table has been added, but doesn't show up when I run ACCESS. Refreshing the window doesn't do anything. When the same statement is performed in a VBA Module, the table is created and shows up in the Database Window. =09 Assumptions: 1. ACCESS 2000 / DAO 3.6 2. Python 2.2 3. win32all-148 4. MakePy on DAO 3.6 Object Library =09 Example Session using Pythonwin (just to illustrate what I've done >>> # open a database and print out objects. >>> # database contains 2 tables =09 >>> from win32com.client import Dispatch, constants >>> dbe =3D Dispatch('DAO.DBEngine.36') >>> wrk =3D dbe.Workspaces(0) >>> db =3D wrk.OpenDatabase('pydb.mdb') >>> dbe >>> wrk >>> db =09 >>> # enumerate TableDefs (system tables not shown) will print 2 tables currently in the database: >>> tbldefs =3D db.TableDefs >>> for tbl in tbldefs: print tbl.Name =09 tblEx01 tblEx02 =09 >>> # now lets create a new table using JET SQL >>> txtsql =3D 'CREATE TABLE tblNewTable (Name CHAR(40), City CHAR(40) );' >>> db.Execute(txtsql) =09 Everything's okay here, table is created, no problem. Now let's refresh TableDefs and print it out. =09 >>> db.TableDefs.Refresh() >>> tbldefs =3D db.TableDefs >>> for tbl in tbldefs: print i.Name =09 tblEx01 tblEx02 tblNewTable =09 If I switch to ACCESS and refresh the Database Window, table tblNewTable is not included in the list. =09 I've tried the following scenarios: =09 1. If I close both ACCESS and Pythonwin and re-open the file with ACCESS, the new table tblNewTable is not shown. =09 2. Closing ACCESS and running Pythonwin: table shows up in the TableDefs collection! =09 3. Closing Pythonwin and opening ACCESS: If I use the CREATE TABLE (from above) in a Sub procedure, using the SAME name, the table is created AND SHOWS UP IN THE DATABASE WINDOW! One would think an error would have been raised at this point. =09 4. Closing ACCESS and opening Pythonwin: I can add new records to this table using the following JET SQL INSERT statement: =09 >>> r =3D 'INSERT INTO tblNewTable (Name, City) VALUES ("George", "Toronto");' >>> db.Execute(r) =09 and will show up in Python. No data is shown in ACCESS, even if the table was first created using VBA in a module. =09 It may not be too important of a problem since I haven't had any problem (so far) using DOA in Python. I just wanted to find out if JET SQL works the same way and apparently I've come across these "warts". =09 Any ideas? =09 George Vestergom =09 =09 _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 =09 ?+a|"}j)b b=13=1A') =DA=9C=08m=E0=A0=B6+az+=E1=A5=83Yb=E0=A0=B2~ h=E1=A2=9F= =08 From eric@enthought.com Fri Jul 19 04:55:18 2002 From: eric@enthought.com (eric jones) Date: Thu, 18 Jul 2002 22:55:18 -0500 Subject: [python-win32] Python for COM controls Message-ID: <000401c22ed8$18bb31d0$6b01a8c0@ericlaptop> Hello, I'm trying to determine if Python works for building UI COM Controls that can be embedded in IE and other applications. In particular, I'd like to write a control that does some image processing, displays the result in a window within IE, and responds to events from the user. I haven't been successful tracking down a Python COM example that handles UI stuff like drawing and click events. If someone can point me to an example that handles the OnDraw event, I'd be much obliged. Thanks, eric From mhammond@skippinet.com.au Fri Jul 19 08:33:04 2002 From: mhammond@skippinet.com.au (Mark Hammond) Date: Fri, 19 Jul 2002 17:33:04 +1000 Subject: [python-win32] Python for COM controls In-Reply-To: <000401c22ed8$18bb31d0$6b01a8c0@ericlaptop> Message-ID: > I'm trying to determine if Python works for building UI COM Controls > that can be embedded in IE and other applications. In particular, I'd > like to write a control that does some image processing, displays the > result in a window within IE, and responds to events from the user. > > I haven't been successful tracking down a Python COM example that > handles UI stuff like drawing and click events. If someone can point me > to an example that handles the OnDraw event, I'd be much obliged. Unfortunately, that is still a work in progress. It looks like this may pick up again soon as Robin Dunn wants to implement this for wxPython. Mark. From unifoam@total.net Fri Jul 19 14:32:02 2002 From: unifoam@total.net (George Vestergom) Date: Fri, 19 Jul 2002 09:32:02 -0400 Subject: [python-win32] Problems using JET SQL CREATE Message-ID: <3D3814D2.41BDD1B3@total.net> "Kunkle, Rob E" wrote: > > Hi George - > > I know the Access tables have a property that says whether or not they are > Visible in the database window. Maybe ADO does not do this by default? > > I can't find the details of this, but it could be that you just need to > somehow manipulate the extended properties of the table object and flip a > switch. Probably ADOX is your best bet to get more control of the objects. > > Rob --------------------------------------- "Jorgensen, Jens" wrote: > > George, > > Although I can't be certain I'm going to guess that the differences in behavior between >Python and VBS are occuring because when you are executing the statements in Python the >objects do not get deleted and somehow the data is not being written through to the file. Some >of the scenarios support this and others contradict it but I still believe this is the case. >Since the interface is COM the COM objects themselves don't know if python is calling them or >VBS is and the results should be no different. Try putting your statements into a .py file and >running the scripts with python.exe rathen than pythonwin. Any difference observed then? > > BTW I use ADO myself and manipulate Jet databases fairly often and at times use Access in >tandem and haven't seen any problems like this. You can create new Jet databases too, you just >use ADOX. ADOX also let's you get lists of tables, etc. ------------------------------------------------------------ ------------------------------------------------------------ Thank you Jens and Rob: False Alarm! JET SQL statements works with Python. My mistake. Thank you for your response to my problem. After looking at my code (again!), I found the error and it turned out to be a stupid path problem (same database, wrong folder!). I took your suggestion by putting my statements in a .py file and running the script, and thats where I discovered the problem. In fact, the JET SQL statements works within IDLE/Pyhonwin without problem. The interactive environment provided by Python allows for a simpler and faster understanding of DAO, Excell, and Word objects and collections (and ADO, I'm sure) than using a VBA module in ACCESS and trying things out in the Immediate window. Thanks again for the help, George Vestergom From eric@enthought.com Sat Jul 20 05:07:10 2002 From: eric@enthought.com (eric jones) Date: Fri, 19 Jul 2002 23:07:10 -0500 Subject: [python-win32] Python for COM controls In-Reply-To: Message-ID: <000101c22fa2$ec69a870$777ba8c0@ericlaptop> > -----Original Message----- > From: Mark Hammond [mailto:mhammond@skippinet.com.au] > Sent: Friday, July 19, 2002 2:33 AM > To: eric jones; python-win32@python.org > Cc: travis@enthought.com > Subject: RE: [python-win32] Python for COM controls > > > I'm trying to determine if Python works for building UI COM Controls > > that can be embedded in IE and other applications. In particular, I'd > > like to write a control that does some image processing, displays the > > result in a window within IE, and responds to events from the user. > > > > I haven't been successful tracking down a Python COM example that > > handles UI stuff like drawing and click events. If someone can point me > > to an example that handles the OnDraw event, I'd be much obliged. > > Unfortunately, that is still a work in progress. It looks like this may > pick up again soon as Robin Dunn wants to implement this for wxPython. Thanks for the information. I'll ping him about the status. eric From rick@kaye.to Tue Jul 23 22:30:29 2002 From: rick@kaye.to (Rick Kaye) Date: Tue, 23 Jul 2002 17:30:29 -0400 Subject: [python-win32] Pythonwin requires two tries to start Message-ID: This is a multi-part message in MIME format. --Boundary_(ID_UJ48quJMXjpHmdB++7gE0g) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT There seems to be something wrong with my Python setup. I am running PythonWin under Windows ME. The first time that I try to run PythonWin each day, the hourglass cursor appears for 5-10 seconds and then it goes away. The IDE does not appear. If I try to start it again, I get a window with the message "There was an error in the DDE conversation with PythonWin". I then click on an OK button and PytonWin starts. The IDE seems to run normally from that point on. Any thoughts on what's wrong. --Boundary_(ID_UJ48quJMXjpHmdB++7gE0g) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT

There seems to be something wrong with my Python setup. I am running PythonWin under Windows ME. The first time that I try to run PythonWin each day, the hourglass cursor appears for 5-10 seconds and then it goes away. The IDE does not appear. If I try to start it again, I get a window with the message "There was an error in the DDE conversation with PythonWin". I then click on an OK button and PytonWin starts. The IDE seems to run normally from that point on. Any thoughts on what's wrong.
--Boundary_(ID_UJ48quJMXjpHmdB++7gE0g)-- From jens.jorgensen@tallan.com Tue Jul 23 23:59:39 2002 From: jens.jorgensen@tallan.com (Jens B. Jorgensen) Date: Tue, 23 Jul 2002 17:59:39 -0500 Subject: [python-win32] Pythonwin requires two tries to start References: Message-ID: <3D3DDFDB.5040600@tallan.com> I'm not sure why yours does that but I'm fairly sure I have run pythonwin.exe in Windows ME without seeing this issue. Rick Kaye wrote: > There seems to be something wrong with my Python setup. I am running > PythonWin under Windows ME. The first time that I try to run PythonWin > each day, the hourglass cursor appears for 5-10 seconds and then it > goes away. The IDE does not appear. If I try to start it again, I get > a window with the message "There was an error in the DDE conversation > with PythonWin". I then click on an OK button and PytonWin starts. The > IDE seems to run normally from that point on. Any thoughts on what's > wrong. -- Jens B. Jorgensen jens.jorgensen@tallan.com "With a focused commitment to our clients and our people, we deliver value through customized technology solutions" From mhammond@skippinet.com.au Wed Jul 24 02:38:39 2002 From: mhammond@skippinet.com.au (Mark Hammond) Date: Wed, 24 Jul 2002 11:38:39 +1000 Subject: [python-win32] Pythonwin requires two tries to start In-Reply-To: Message-ID: This is a multi-part message in MIME format. ------=_NextPart_000_0ACE_01C23306.A7E44310 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit You are probably running some other application that prevents DDE message processing. Examples are Apache and some other "server" type programs. If you can't work out what it is, modify the Pythonwin shortcut to pass a "/nodde" command-line option. This will prevent Pythonwin from trying to find an existing instance to switch to, and should pop up immediately. Mark. -----Original Message----- From: python-win32-admin@python.org [mailto:python-win32-admin@python.org]On Behalf Of Rick Kaye Sent: Wednesday, 24 July 2002 7:30 AM To: python-win32@python.org Subject: [python-win32] Pythonwin requires two tries to start There seems to be something wrong with my Python setup. I am running PythonWin under Windows ME. The first time that I try to run PythonWin each day, the hourglass cursor appears for 5-10 seconds and then it goes away. The IDE does not appear. If I try to start it again, I get a window with the message "There was an error in the DDE conversation with PythonWin". I then click on an OK button and PytonWin starts. The IDE seems to run normally from that point on. Any thoughts on what's wrong. ------=_NextPart_000_0ACE_01C23306.A7E44310 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
You=20 are probably running some other application that prevents DDE message=20 processing.  Examples are Apache and some other "server" type=20 programs.
 
If you=20 can't work out what it is, modify the Pythonwin shortcut to pass a = "/nodde"=20 command-line option.  This will prevent Pythonwin from trying to = find an=20 existing instance to switch to, and should pop up=20 immediately.
 
Mark.
-----Original Message-----
From: = python-win32-admin@python.org=20 [mailto:python-win32-admin@python.org]On Behalf Of Rick=20 Kaye
Sent: Wednesday, 24 July 2002 7:30 AM
To:=20 python-win32@python.org
Subject: [python-win32] Pythonwin = requires two=20 tries to start

There seems to be something = wrong with my=20 Python setup. I am running PythonWin under Windows ME. The first time = that I=20 try to run PythonWin each day, the hourglass cursor appears for 5-10 = seconds=20 and then it goes away. The IDE does not appear. If I try to start it = again, I=20 get a window with the message "There was an error in the DDE = conversation with=20 PythonWin". I then click on an OK = button and=20 PytonWin starts. The IDE seems to run normally from that point on. Any = thoughts on what's = wrong.
------=_NextPart_000_0ACE_01C23306.A7E44310-- From rick@kaye.to Wed Jul 24 03:03:55 2002 From: rick@kaye.to (Rick Kaye) Date: Tue, 23 Jul 2002 22:03:55 -0400 Subject: [python-win32] Pythonwin requires two tries to start In-Reply-To: Message-ID: This is a multi-part message in MIME format. --Boundary_(ID_AigETi8yt1mmpGuR3yrfJQ) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT I'm not running Apache nor is anything else I'm running a server type program (as far as I know). But, the /nodde option did the trick. Thanks a lot. -----Original Message----- From: Mark Hammond [mailto:mhammond@skippinet.com.au] Sent: Tuesday, July 23, 2002 9:39 PM To: Rick Kaye; python-win32@python.org Subject: RE: [python-win32] Pythonwin requires two tries to start You are probably running some other application that prevents DDE message processing. Examples are Apache and some other "server" type programs. If you can't work out what it is, modify the Pythonwin shortcut to pass a "/nodde" command-line option. This will prevent Pythonwin from trying to find an existing instance to switch to, and should pop up immediately. Mark. -----Original Message----- From: python-win32-admin@python.org [mailto:python-win32-admin@python.org]On Behalf Of Rick Kaye Sent: Wednesday, 24 July 2002 7:30 AM To: python-win32@python.org Subject: [python-win32] Pythonwin requires two tries to start There seems to be something wrong with my Python setup. I am running PythonWin under Windows ME. The first time that I try to run PythonWin each day, the hourglass cursor appears for 5-10 seconds and then it goes away. The IDE does not appear. If I try to start it again, I get a window with the message "There was an error in the DDE conversation with PythonWin". I then click on an OK button and PytonWin starts. The IDE seems to run normally from that point on. Any thoughts on what's wrong. --Boundary_(ID_AigETi8yt1mmpGuR3yrfJQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT
I'm not running Apache nor is anything else I'm running a server type program (as far as I know). But, the /nodde option did the trick. Thanks a lot.
-----Original Message-----
From: Mark Hammond [mailto:mhammond@skippinet.com.au]
Sent: Tuesday, July 23, 2002 9:39 PM
To: Rick Kaye; python-win32@python.org
Subject: RE: [python-win32] Pythonwin requires two tries to start

You are probably running some other application that prevents DDE message processing.  Examples are Apache and some other "server" type programs.
 
If you can't work out what it is, modify the Pythonwin shortcut to pass a "/nodde" command-line option.  This will prevent Pythonwin from trying to find an existing instance to switch to, and should pop up immediately.
 
Mark.
-----Original Message-----
From: python-win32-admin@python.org [mailto:python-win32-admin@python.org]On Behalf Of Rick Kaye
Sent: Wednesday, 24 July 2002 7:30 AM
To: python-win32@python.org
Subject: [python-win32] Pythonwin requires two tries to start

There seems to be something wrong with my Python setup. I am running PythonWin under Windows ME. The first time that I try to run PythonWin each day, the hourglass cursor appears for 5-10 seconds and then it goes away. The IDE does not appear. If I try to start it again, I get a window with the message "There was an error in the DDE conversation with PythonWin". I then click on an OK button and PytonWin starts. The IDE seems to run normally from that point on. Any thoughts on what's wrong.
--Boundary_(ID_AigETi8yt1mmpGuR3yrfJQ)--