From mhammond at skippinet.com.au Sun May 4 07:39:08 2014 From: mhammond at skippinet.com.au (Mark Hammond) Date: Sun, 04 May 2014 15:39:08 +1000 Subject: [python-win32] [ANN] pywin32 build 219 released Message-ID: <5365D27C.2090406@skippinet.com.au> Hi all, I'm happy to announce the release of pywin32 build 219. This release has addressed a number of bugs with previous builds, has added a number of new features (thanks mainly to Roger Upole), has a new version of adodbapi (thanks to Vernon Cole) and has improved support for installing with Python 3.4 - I've appended the change log at the end of this mail. Downloads are available at: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/ For initial support (eg, to ask questions about the release etc), please contact this mailing-list (python-win32 at python.org). If you want to report a bug, please do so at https://sf.net/projects/pywin32. As always, thanks to everyone who contributed to this release, both in terms of code and reporting bugs to the tracker. As usual, Roger Upole contributed a huge number of fixes and enhancements for this release - thanks! Cheers, Mark Changes: Since build 218: ---------------- * win32com.mapi Addded outlook interface IConverterSession with methods MIMEToMAPI, MAPIToMIMEStm, and SetAdrBook. Added method OpenStreamOnFile (Nick Czeczulin) Ignore PT_MV_TSTRING along with PT_TSTRING (Nick Czeczulin) * Conversions from a Python object to a variant now does a better job at deciding what variant type to use, taking into account the size and sign of the value (Stefan Schukat via patch #127) * Add support for VT_I8 and VT_UI8 when converting a variant into a Python object (Stefan Schukat via patch #128) * win32com.mapi.exchange Added 64-bit support by excluding the 32-bit Ex2kSdk.lib functions from 64-bit builds. Unfortunately, this means that only IExchangeManageStore::CreateStoreEntryID is currently available in a 64-bit build. (Nick Czeczulin) * adodbapi updated to version 2.6 -- new examples folder includes short programs for reading and writing .xls spreadsheets and reading ACCESS .mdb files using SQL. New functions .is64bit.Python() and is64bit.os() to help pick the correct drivers. New function .schema_table.names() returns a list of all tables in a database. Ability for a Windows computer to be a database proxy for a remote (Linux or Windows) unit. see adodbapi/README.txt for more information. * Fix issue implementing COM objects from within a virtualenv (Kevin Smyth via issue #3597965) * Fix some issues using decimal objects with Python 3.3 and later (rupole) * Add a counterpart to VB's Nothing, from patch 3609027 by Stefan Schukat * win32api Handle REG_QWORD (64-bit ints) (rupole) Add GetEnvironmentVariableW and SetEnvironmentVariableW (rupole) Fix function pointer check for win32api.GetNativeSystemInfo (bug#665) * win32com.shell Add interfaces IFileOperation and IFileOperationProgressSink Add SHParseDisplayName (feature req #3585998) (rupole) * win32com.propsys Add interfaces IPropertyChange, IPropertyChangeArray, and IObjectWithPropertyKey Add functions PSCreateSimplePropertyChange, PSCreatePropertyChangeArray, and SHSetDefaultProperties * win32crypt Add functions and objects for handling certificates and certificate stores * win32gui Add RegisterHotKey (rupole) * win32evtlog Add several more Evt* functions (Vista+ event log API) * win32prociess Add EnumProcessModulesEx (feature request 3608155) (rupole) * pythonwin Fix a hang using the tools menu From mc at mclaveau.com Sun May 4 23:51:04 2014 From: mc at mclaveau.com (mc@mclaveau) Date: Sun, 04 May 2014 23:51:04 +0200 Subject: [python-win32] [ANN] pywin32 build 219 released In-Reply-To: <5365D27C.2090406@skippinet.com.au> References: <5365D27C.2090406@skippinet.com.au> Message-ID: <5366B648.4050505@mclaveau.com> Merci beaucoup, Mark, Roger, Vernon ... et Cie. Thank you very much, Mark, Roger, Vernon ... & Cie. @-salutations -- Michel Claveau Le 04.05.14 07:39, Mark Hammond a ?crit : > Hi all, > I'm happy to announce the release of pywin32 build 219. This > release has addressed a number of bugs with previous builds, has added > a number of new features (thanks mainly to Roger Upole), has a new > version of adodbapi (thanks to Vernon Cole) and has improved support > for installing with Python 3.4 - I've appended the change log at the > end of this mail. > > Downloads are available at: > > https://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/ > > For initial support (eg, to ask questions about the release etc), > please contact this mailing-list (python-win32 at python.org). If you > want to report a bug, please do so at https://sf.net/projects/pywin32. > > As always, thanks to everyone who contributed to this release, both in > terms of code and reporting bugs to the tracker. As usual, Roger > Upole contributed a huge number of fixes and enhancements for this > release - thanks! > > Cheers, > > Mark > > Changes: > > Since build 218: > ---------------- > * win32com.mapi > Addded outlook interface IConverterSession with methods MIMEToMAPI, > MAPIToMIMEStm, and SetAdrBook. > Added method OpenStreamOnFile (Nick Czeczulin) > Ignore PT_MV_TSTRING along with PT_TSTRING (Nick Czeczulin) > > * Conversions from a Python object to a variant now does a better job > at deciding what variant type to use, taking into account the > size and sign of the value (Stefan Schukat via patch #127) > > * Add support for VT_I8 and VT_UI8 when converting a variant into a > Python object (Stefan Schukat via patch #128) > > * win32com.mapi.exchange > Added 64-bit support by excluding the 32-bit Ex2kSdk.lib functions > from 64-bit builds. Unfortunately, this means that only > IExchangeManageStore::CreateStoreEntryID is currently available in a > 64-bit build. (Nick Czeczulin) > > * adodbapi updated to version 2.6 -- new examples folder includes short > programs for reading and writing .xls spreadsheets and reading ACCESS > .mdb files using SQL. New functions .is64bit.Python() and > is64bit.os() to help pick the correct drivers. > New function .schema_table.names() returns a list of all tables in a > database. > Ability for a Windows computer to be a database proxy for a remote > (Linux or Windows) unit. > see adodbapi/README.txt for more information. > > * Fix issue implementing COM objects from within a virtualenv (Kevin > Smyth via issue #3597965) > > * Fix some issues using decimal objects with Python 3.3 and later > (rupole) > > * Add a counterpart to VB's Nothing, from patch 3609027 by Stefan > Schukat > > * win32api > Handle REG_QWORD (64-bit ints) (rupole) > Add GetEnvironmentVariableW and SetEnvironmentVariableW (rupole) > Fix function pointer check for win32api.GetNativeSystemInfo > (bug#665) > > * win32com.shell > Add interfaces IFileOperation and IFileOperationProgressSink > Add SHParseDisplayName (feature req #3585998) (rupole) > > * win32com.propsys > Add interfaces IPropertyChange, IPropertyChangeArray, and > IObjectWithPropertyKey > Add functions PSCreateSimplePropertyChange, > PSCreatePropertyChangeArray, and SHSetDefaultProperties > > * win32crypt > Add functions and objects for handling certificates and certificate > stores > > * win32gui > Add RegisterHotKey (rupole) > > * win32evtlog > Add several more Evt* functions (Vista+ event log API) > > * win32prociess > Add EnumProcessModulesEx (feature request 3608155) (rupole) > > * pythonwin > Fix a hang using the tools menu > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win3 From lukaszj at onet.pl Wed May 7 22:46:38 2014 From: lukaszj at onet.pl (=?iso-8859-2?B?o3VrYXN6IEpha3Vib3dza2k=?=) Date: Wed, 07 May 2014 22:46:38 +0200 Subject: [python-win32] Referring to default (unnamed) property Message-ID: Hello, How do I refer to an unnamed property (like the one on this page: http://www.gpsoft.com.au/help/opus11/index.html#!Documents/Scripting/Vars.htm)? str(type(DOpus.vars)) or str(type(DOpus.vars(0))) gives me: I can access methods mentioned on the page without problems, but this default property is a mystery to me. Maybe related: str(DOpus.vars(0)) does not work as well, but DOpus.vars.Get('SomeSetVariable') works OK. TIA, Regards, ?ukasz From lukaszj at onet.pl Thu May 8 21:36:08 2014 From: lukaszj at onet.pl (=?iso-8859-2?B?o3VrYXN6IEpha3Vib3dza2k=?=) Date: Thu, 08 May 2014 21:36:08 +0200 Subject: [python-win32] [ANN] pywin32 build 219 released In-Reply-To: <5365D27C.2090406@skippinet.com.au> References: <5365D27C.2090406@skippinet.com.au> Message-ID: Thanks to all who contributed! ?ukasz From redgatormds at gmail.com Thu May 8 17:14:04 2014 From: redgatormds at gmail.com (Red Gator) Date: Thu, 8 May 2014 11:14:04 -0400 Subject: [python-win32] Yet another person confused on static versus dynamic dispatch Message-ID: I have 29 years of professional experience with UNIX (can you say BSD 4.3 Tahoe, where I was manufacturing the "Tahoe" architecture?) Once upon a time I cared nothing for Windows and it's ilk, and nobody demanded that I do..And life was good. Then I get assigned to this project which is written entirely in Python. That's OK, Python had been on my list for a long time. And Python on UNIX AND freaking Windows? Well, with a dose of Cygwin and some well-implemented Python on the Windows box, I think I can manage... Then I have a request to get this Windows-only application named FalconView (http://www.falconview.org) to talk to the application. How is that done? Windows COM interfaces. Nail me to the perch now... Everything I know about COM I have learned from pywin32 and Mr Mark Hammond. Thank you, Mr Hammond, this is brilliant. Although it does feel somewhat like meeting an iceberg in almost exactly the wrong way. With the help of "The Book" (being a Uni Florida Gator, I rather appreciate the crocodilian on the cover), I managed to makepy.py the TLB of the FalconView automation (almost like I know what I'm talking about), and got many of the features working well enough to be usable. I've been able to demonstrate functionality and gotten past a proof-of-concept, and now am on my way to making something real (wink, wink, nuff said, say-no-more). I'm re-factoring the code now to get access to more interactive features (what's a GUI without interaction?) and smacked into many APIs I could not make work. I even hand-jiggered the file makepy.py created to get past some issues, but then I smacked into a brick wall too high and too long to get over or around. Searching desparately for a solution, I found a discussion that made sense out of this diagnostic output: Map.com= ... Layer.com= Apparently this means "Map.com is static dispatch and Layer.com is not". (Pg 205 - not quite the same thing) So methods in Layer.com could be refered to without regard to case and Map.com could not (see, I've learned something!) And apparently there is not enough type information in the TLB to make the dynamic dispatch work properly, so things like this from Layer.com (from OLE/COM Viewer... oh, the evil things I'm learning...): [id(0x00000016)] long GetVersion( short* major, short* minor, short* revision); Could not be made to work (always get "Type mismatch"). With things like this is Map.com: [id(0x00000010)] long GetMapDisplay( double* lat, double* lon, double* rotation, long* category, long* map_handle, long* zoom, long* projection_type); The latter has worked brilliantly from day one. I had Map.com defined this way: from win32com.server.util import wrap, unwrap import win32com.client import pythoncom import win32ui self.mapClass = win32com.client.gencache.GetClassForProgID("FalconView.Map") self.com = self.mapClass() I had Layer.com defined this way: self.com = win32com.client.Dispatch("FalconView.Layer") I do recall thrashing around a good bit trying to get started. Map came before Layer (Layer objects go over the top of Map objects), "The Book" around page 200 could probably have deserved a whole chapter.Reviewing what's there I can't quite tell you how I came upon this code as a solution; they BOTH look WRONG now. I recently came across this posting (Mark Hammond ? 12/17/2013 5:11:59 AM): ob = win32com.client.Dispatch("The.ClassId") at which point 'ob' is going to be a "dumb dispatch" object as it can't find the typelib. Then, if you ran makepy "normally" you could do: kls = win32com.client.gencache.GetClassForProgID("The.ClassId") # wrap the dumb object in the generated class ob = kls(ob) which splits the difference between my two implementations. Sure I can do that. But after this debacle I find I need to know "why". - Why does my object come up as "win32com.gen_py.None.Map" when it should come up as 'win32com.gen_py.<>.Map or even "win32com.gen_py.<>.Map. There was some comment that in this state the object would be unusable, whereas this is the object that I have found actually usable. - Pg 203 "Dispatch() [checks] to see if MakePy support exists for the object". Well, I KNOW that the MakePy file is being referenced because I've made manual changes to it and have had those changes show up as new behavior in the application. So why doesn't the Layer.com = Dispatch() work as described? - What is the necessity in the posting where the COM object class is derived from the Dispatch() object, which I don't appear to be doing in the working case? I think that's enough for now. Time for some eggs and spam... -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukaszj at onet.pl Sat May 10 12:29:53 2014 From: lukaszj at onet.pl (=?iso-8859-2?B?o3VrYXN6IEpha3Vib3dza2k=?=) Date: Sat, 10 May 2014 12:29:53 +0200 Subject: [python-win32] Referring to default (unnamed) property In-Reply-To: References: Message-ID: Self-reply... I got a bit confused actually, DOpus.vars is just like a bit broken list with extra methods/fields: After do.vars.Set('qqq',1) Then len(do.vars[0]) or do.vars[0] works as expected, though not do.vars[0] = 'zzz' or do.vars.append('yyy') I guess this is a matter of how Directory Opus implements and exposes objects to ActiveScripting and then how pywin interprets them. I will need just to learn it. Regards, > Hello, > > How do I refer to an unnamed property (like the one on this page: > http://www.gpsoft.com.au/help/opus11/index.html#!Documents/Scripting/Vars.htm)? > > str(type(DOpus.vars)) > or > str(type(DOpus.vars(0))) > gives me: > > > I can access methods mentioned on the page without problems, but this > default property is a mystery to me. > > Maybe related: str(DOpus.vars(0)) does not work as well, but > DOpus.vars.Get('SomeSetVariable') works OK. > > TIA, > > Regards, > ?ukasz > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 -- U?ywam klienta poczty Opera Mail: http://www.opera.com/mail/ From jacob at blindza.co.za Sun May 11 22:39:17 2014 From: jacob at blindza.co.za (Jacob Kruger) Date: Sun, 11 May 2014 22:39:17 +0200 Subject: [python-win32] Python version itself Message-ID: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> I have thus far been working with python 2.7, for no particular reason aside from that it's been stable/comfortable/usable from when I really got going with python, but, while think latest release version of python is something like 3.4, what are the reasons, if any, for sticking to/with the older version for a while longer? Cross platform compatibility? Code updates it will require if moving older code over to newer interpreter, etc.? TIA Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhood2 at comcast.net Sun May 11 23:09:56 2014 From: bhood2 at comcast.net (Bob Hood) Date: Sun, 11 May 2014 15:09:56 -0600 Subject: [python-win32] Python version itself In-Reply-To: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> References: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> Message-ID: <536FE724.6010505@comcast.net> On 5/11/2014 2:39 PM, Jacob Kruger wrote: > I have thus far been working with python 2.7, for no particular reason aside > from that it's been stable/comfortable/usable from when I really got going > with python, but, while think latest release version of python is something > like 3.4, what are the reasons, if any, for sticking to/with the older > version for a while longer? > > Cross platform compatibility? Code updates it will require if moving older > code over to newer interpreter, etc.? Kind of off topic, but what the heck, I'm bored today. :) Typically, it's dependencies and the cost of the effort to address them. Python 3.x literally made language changes that have the potential to break existing 2.7.x scripts, and I'd imagine the 2.7.x line still has a huge amount of production dependency (I know it does for us). You can spend the time retooling your product, and introduce the one-way upgrade in a new release, but that trickles down to your customers, forcing them to spend time updating any collection of Python tools they themselves may have created. Personally, I've not seen anything in Python 3.x that is sexy enough to make me want to put forth the effort. I have yet to run into something I cannot accomplish using 2.7.x that 3.x makes possible (which is likely another reason that the transition is so slow). -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.Holtz at gmx.net Sun May 11 23:32:16 2014 From: A.Holtz at gmx.net (Andreas Holtz) Date: Sun, 11 May 2014 23:32:16 +0200 Subject: [python-win32] Referring to default (unnamed) property In-Reply-To: References: Message-ID: <536FEC60.9080103@gmx.net> Hi ?ukasz, when you use a COM-Interface via VB for example things like foo.bar(0) = "foo" are possible (as I just read these are properties). In Python this syntax is not working. Instead, getters and setters are generated by PyWin. I guess somewhere (probably in the files generated by Dispatch) do.vars[param] is implemented as do.vars.Get(param) Regards Andreas PS: Feel free to correct me, if I am wrong. schrieb ?ukasz Jakubowski am 10.05.2014 12:29: > Self-reply... > > I got a bit confused actually, DOpus.vars is just like a bit broken list with extra methods/fields: > > After > do.vars.Set('qqq',1) > Then > len(do.vars[0]) > or > do.vars[0] > works as expected, though not > do.vars[0] = 'zzz' > or > do.vars.append('yyy') > > I guess this is a matter of how Directory Opus implements and exposes objects to ActiveScripting and then how pywin interprets them. I will > need just to learn it. > > Regards, > > > >> Hello, >> >> How do I refer to an unnamed property (like the one on this page: >> http://www.gpsoft.com.au/help/opus11/index.html#!Documents/Scripting/Vars.htm)? >> >> str(type(DOpus.vars)) >> or >> str(type(DOpus.vars(0))) >> gives me: >> >> >> I can access methods mentioned on the page without problems, but this default property is a mystery to me. >> >> Maybe related: str(DOpus.vars(0)) does not work as well, but DOpus.vars.Get('SomeSetVariable') works OK. >> >> TIA, >> >> Regards, >> ?ukasz >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 > > From jacob at blindza.co.za Sun May 11 23:32:36 2014 From: jacob at blindza.co.za (Jacob Kruger) Date: Sun, 11 May 2014 23:32:36 +0200 Subject: [python-win32] Python version itself In-Reply-To: <536FE724.6010505@comcast.net> References: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> <536FE724.6010505@comcast.net> Message-ID: <08F63693F98944EF8A203C039815CD23@JakePC> Thanks. And, yes, know it wasn't specifically python-win32 specific , but, in terms of platform compatibility, my primary issue thus far has been generating windows executables while making use of various external modules, and one of the new releases along the lines of this is a newer version of py2exe, but, only for python 3.3 upwards, and that's pretty much why even considered moving over to newer version of python itself, but, on other hand, seems am managing to work with what I want to most of the time, using python 2.7 and cx_freeze to then generate executables to pass on to end users, on different versions of windows itself, using workarounds like my relatively recent issue with MP3 playback, etc. Stay well Jacob Kruger Blind Biker Skype: BlindZA "Roger Wilco wants to welcome you...to the space janitor's closet..." ----- Original Message ----- From: Bob Hood To: Jacob Kruger ; python-win32 at python.org Sent: Sunday, 11 May, 2014 11:09 PM Subject: Re: [python-win32] Python version itself On 5/11/2014 2:39 PM, Jacob Kruger wrote: I have thus far been working with python 2.7, for no particular reason aside from that it's been stable/comfortable/usable from when I really got going with python, but, while think latest release version of python is something like 3.4, what are the reasons, if any, for sticking to/with the older version for a while longer? Cross platform compatibility? Code updates it will require if moving older code over to newer interpreter, etc.? Kind of off topic, but what the heck, I'm bored today. :) Typically, it's dependencies and the cost of the effort to address them. Python 3.x literally made language changes that have the potential to break existing 2.7.x scripts, and I'd imagine the 2.7.x line still has a huge amount of production dependency (I know it does for us). You can spend the time retooling your product, and introduce the one-way upgrade in a new release, but that trickles down to your customers, forcing them to spend time updating any collection of Python tools they themselves may have created. Personally, I've not seen anything in Python 3.x that is sexy enough to make me want to put forth the effort. I have yet to run into something I cannot accomplish using 2.7.x that 3.x makes possible (which is likely another reason that the transition is so slow). -------------- next part -------------- An HTML attachment was scrubbed... URL: From breamoreboy at yahoo.co.uk Mon May 12 00:31:21 2014 From: breamoreboy at yahoo.co.uk (Mark Lawrence) Date: Sun, 11 May 2014 23:31:21 +0100 Subject: [python-win32] Python version itself In-Reply-To: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> References: <3D2CCCE263B6407CB27A19C3E19B844E@JakePC> Message-ID: On 11/05/2014 21:39, Jacob Kruger wrote: > I have thus far been working with python 2.7, for no particular reason > aside from that it's been stable/comfortable/usable from when I really > got going with python, but, while think latest release version of python > is something like 3.4, what are the reasons, if any, for sticking > to/with the older version for a while longer? > Cross platform compatibility? Code updates it will require if moving > older code over to newer interpreter, etc.? > TIA > > Jacob Kruger > Blind Biker > Skype: BlindZA > "Roger Wilco wants to welcome you...to the space janitor's closet..." > Why ask this on both the windows and wxpython lists but not on the main Python mailing list? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com From skippy.hammond at gmail.com Mon May 12 01:39:19 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Mon, 12 May 2014 09:39:19 +1000 Subject: [python-win32] Yet another person confused on static versus dynamic dispatch In-Reply-To: References: Message-ID: <53700A27.4010108@gmail.com> On 9/05/2014 1:14 AM, Red Gator wrote: > Sure I can do that. But after this debacle I find I need to know "why". > > * Why does my object come up as "win32com.gen_py.None.Map" when it > should come up as 'win32com.gen_py.<>.Map or even > "win32com.gen_py.<>.Map. There was > some comment that in this state the object would be unusable, > whereas this is the object that I have found actually usable. > * Pg 203 "Dispatch() [checks] to see if MakePy support exists for the > object". Well, I KNOW that the MakePy file is being referenced > because I've made manual changes to it and have had those changes > show up as new behavior in the application. So why doesn't the > Layer.com = Dispatch() work as described? Unfortunately, these 2 are always down to the implementations of the object. When win32com gets an object (eg, as the result of calling some function or getting a property) there are ways to ask the object what type it is - but this is optional. In short, if the object doesn't describe itself, we don't know what it is. As that is all down to the implementation of the object, there is no single answer to why that is sometimes the case. > * What is the necessity in the posting where the COM object class is > derived from the Dispatch() object, which I don't appear to be doing > in the working case? I'm not sure I understand the question correctly, but the example you refer to is a way for you to say "hey - *I* know what type the object is even if the object itself doesn't, so use this for the object" HTH, Mark From mhammond at skippinet.com.au Tue May 13 00:43:09 2014 From: mhammond at skippinet.com.au (Mark Hammond) Date: Tue, 13 May 2014 08:43:09 +1000 Subject: [python-win32] Fwd: Re: Yet another person confused on static versus dynamic dispatch In-Reply-To: References: Message-ID: <53714E7D.70809@skippinet.com.au> Poster forgot to CC the list... -------------- next part -------------- An embedded message was scrubbed... From: Red Gator Subject: Re: [python-win32] Yet another person confused on static versus dynamic dispatch Date: Mon, 12 May 2014 10:56:03 -0400 Size: 16412 URL: From esj at harvee.org Tue May 13 06:57:13 2014 From: esj at harvee.org (Eric S. Johansson) Date: Tue, 13 May 2014 00:57:13 -0400 Subject: [python-win32] has the COM interface capability changed since 1999 Message-ID: <5371A629.8050305@harvee.org> back in 1999ish, joel gould wrote the following and I want to know if it is still true. am planning on converting the 2.7ish natlink to 3.X some time over the next year. need to decide if I should leave the C++ code alone or can we go pure python? ----------------------------- The first step in developing the NatLink Python macro system was to develop a Python extension module. This Python extension module, written in C++, provides an interface to the Dragon NaturallySpeaking native APIs from Python scripts. As described above, the Dragon NaturallySpeaking APIs are based on custom COM interfaces. Because they use custom COM interfaces instead of OLE automation, it was not possible to use Mark Hammond?s PythonCOM system [4]. In addition, conventional Python wrapping technology, like SWIG [10] or Py_cpp [11], is designed for libraries that expose C or C++ APIs, not COM interfaces. So that technology could not be used either. Instead I wrote custom C++ code to export a selected set of objects and functions from the Dragon NaturallySpeaking APIs. The extension module is called natlink.dll and can be used from Python by importing ?natlink?. From skippy.hammond at gmail.com Wed May 14 07:37:38 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Wed, 14 May 2014 15:37:38 +1000 Subject: [python-win32] has the COM interface capability changed since 1999 In-Reply-To: <5371A629.8050305@harvee.org> References: <5371A629.8050305@harvee.org> Message-ID: <53730122.2090605@gmail.com> On 13/05/2014 2:57 PM, Eric S. Johansson wrote: > back in 1999ish, joel gould wrote the following and I want to know if it > is still true. am planning on converting the 2.7ish natlink to 3.X some > time over the next year. need to decide if I should leave the C++ code > alone or can we go pure python? It hasn't changed for this use-case, so a pure-python solution probably isn't viable (unless you want to investigate using comtypes). HTH, Mark. > > ----------------------------- > > The first step in developing the NatLink Python macro system was to > develop a Python extension module. This Python extension module, written > in C++, provides an interface to the Dragon NaturallySpeaking native > APIs from Python scripts. > > As described above, the Dragon NaturallySpeaking APIs are based on > custom COM interfaces. Because they > use custom COM interfaces instead of OLE automation, it was not possible > to use Mark Hammond?s PythonCOM system [4]. In addition, conventional > Python wrapping technology, like SWIG [10] or Py_cpp [11], is designed > for libraries that expose C or C++ APIs, not COM interfaces. So that > technology could not be used either. > > Instead I wrote custom C++ code to export a selected set of objects and > functions from the Dragon > NaturallySpeaking APIs. The extension module is called natlink.dll and > can be used from Python by importing ?natlink?. > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 From mc at mclaveau.com Wed May 14 08:43:23 2014 From: mc at mclaveau.com (mc@mclaveau) Date: Wed, 14 May 2014 08:43:23 +0200 Subject: [python-win32] has the COM interface capability changed since 1999 In-Reply-To: <5371A629.8050305@harvee.org> References: <5371A629.8050305@harvee.org> Message-ID: <5373108B.6090404@mclaveau.com> Hi! Warning! The APIs (almost-COM a not COM) of Dragon NaturallySpeaking change (very) often, depending of version of software. A software who run OK with version 11 don't run with version 12. And more... ??? @-salutations -- Michel Claveau From skippy.hammond at gmail.com Wed May 14 10:03:28 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Wed, 14 May 2014 18:03:28 +1000 Subject: [python-win32] has the COM interface capability changed since 1999 In-Reply-To: <53730122.2090605@gmail.com> References: <5371A629.8050305@harvee.org> <53730122.2090605@gmail.com> Message-ID: <53732350.40401@gmail.com> I also meant to mention that pythoncom has grown support for vtable-based *incoming* interfaces - eg, used by content-sinks/event-handlers - so if Dragon has "partial" support for IDispatch-based interfaces you might be OK. Mark On 14/05/2014 3:37 PM, Mark Hammond wrote: > On 13/05/2014 2:57 PM, Eric S. Johansson wrote: >> back in 1999ish, joel gould wrote the following and I want to know if it >> is still true. am planning on converting the 2.7ish natlink to 3.X some >> time over the next year. need to decide if I should leave the C++ code >> alone or can we go pure python? > > It hasn't changed for this use-case, so a pure-python solution probably > isn't viable (unless you want to investigate using comtypes). From gamz4sale at gmail.com Wed May 21 10:49:51 2014 From: gamz4sale at gmail.com (game4 sale) Date: Wed, 21 May 2014 16:49:51 +0800 Subject: [python-win32] Not able to paste file in windows explorer using SetClipboardData Message-ID: Hi, I am trying to copy an image file to windows clipboard using my code and paste it manually in any folder in windows explorer. I am using *Windows 8* *64bit *laptop, running *Python 2.7 *and *pywin32-218* for win32 APIs I managed to paste my file in Wordpad application. But, i cannot paste inside windows explorer. The Paste menu is disabled. Any help/suggestions would be much appreciated. Attached my code for reference. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- from win32api import * from win32clipboard import * import time import pythoncom import struct from pywin32_testutil import str2bytes import ctypes msvcrt = ctypes.cdll.msvcrt kernel32 = ctypes.windll.kernel32 ret_stg=None GMEM_MOVEABLE = 0x0002 def set_clipboard(content): ret_stg = pythoncom.STGMEDIUM() fname_buf=str2bytes(content) fname_ba=bytearray(fname_buf) fname_ba.append('\0') fname_ba.append('\0') fmt="lllll%ss" %len(fname_ba) df=struct.pack(fmt, 20, 0, 0, 0, 0, str(fname_ba)) ret_stg.set(pythoncom.TYMED_HGLOBAL, df) try: OpenClipboard() except: print "open failed, exception=%s"%FormatMessage(GetLastError()) else: try: SetClipboardData(CF_HDROP, ret_stg.data) except: print "set failed, exception = %s"%FormatMessage(GetLastError()) finally: CloseClipboard() def get_clipboard(): try: OpenClipboard() except: print "open failed, exception=%s"%FormatMessage(GetLastError()) else: if(IsClipboardFormatAvailable(CF_HDROP)): handle = GetClipboardDataHandle(CF_HDROP) file_cnt = DragQueryFile(handle) print "file count = %ld"%file_cnt for i in range(0,file_cnt): file_path = DragQueryFile(handle, i) print "file name = %s"%file_path elif(IsClipboardFormatAvailable(CF_UNICODETEXT)): print "CF_UNICODETEXT content" clip_data = GetClipboardData(CF_UNICODETEXT) print "*** content = %s ***"%clip_data else: print "unsupported clipboard format" finally: CloseClipboard() if __name__ == '__main__': file1 = "E:\\pics\\ferrari.jpg" set_clipboard(file1) time.sleep(1) get_clipboard() From timr at probo.com Wed May 21 18:29:19 2014 From: timr at probo.com (Tim Roberts) Date: Wed, 21 May 2014 09:29:19 -0700 Subject: [python-win32] Not able to paste file in windows explorer using SetClipboardData In-Reply-To: References: Message-ID: <537CD45F.3080204@probo.com> game4 sale wrote: > > > I am trying to copy an image file to windows clipboard using my code > and paste it manually in any folder in windows explorer. I am using > *Windows 8* *64bit *laptop, running *Python 2.7 *and *pywin32-218* for > win32 APIs > > I managed to paste my file in Wordpad application. But, i cannot paste > inside windows explorer. The Paste menu is disabled. Any > help/suggestions would be much appreciated. > I'm confused. I just ran your exact code on Win 7 64 with Python 2.7.5 32, unchanged except for the file name, and it worked perfectly. Is the script running as the same login user as Explorer? -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamz4sale at gmail.com Wed May 21 19:02:42 2014 From: gamz4sale at gmail.com (game4 sale) Date: Thu, 22 May 2014 01:02:42 +0800 Subject: [python-win32] Not able to paste file in windows explorer using SetClipboardData In-Reply-To: <537CD45F.3080204@probo.com> References: <537CD45F.3080204@probo.com> Message-ID: Thank you very much for your time. Thats strange. For the login user, i think its same. In my Taskmanager, under User tab, both the processes are running under same user. I also tried to run my script from command prompt with Admin previlege. Still same, i cannot paste the file in Explorer. Also, i found out another problem in my code. I can paste the image in Wordpad application only if the last clipboard content was text. If the last one was image, i cannot paste my new image. It pastes only the old image. On Thu, May 22, 2014 at 12:29 AM, Tim Roberts wrote: > game4 sale wrote: > > > > I am trying to copy an image file to windows clipboard using my code > and paste it manually in any folder in windows explorer. I am using *Windows > 8* *64bit *laptop, running *Python 2.7 *and *pywin32-218* for win32 APIs > > I managed to paste my file in Wordpad application. But, i cannot paste > inside windows explorer. The Paste menu is disabled. Any help/suggestions > would be much appreciated. > > > I'm confused. I just ran your exact code on Win 7 64 with Python 2.7.5 > 32, unchanged except for the file name, and it worked perfectly. > > Is the script running as the same login user as Explorer? > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamz4sale at gmail.com Thu May 22 05:21:14 2014 From: gamz4sale at gmail.com (game4 sale) Date: Thu, 22 May 2014 11:21:14 +0800 Subject: [python-win32] Not able to paste file in windows explorer using SetClipboardData In-Reply-To: References: <537CD45F.3080204@probo.com> Message-ID: I tested my code today on Win 7 64 bit, and it worked almost perfect like Tim said. If the previous clipboard content was Text, my code works perfectly. The failure part is: 1) Copy *Image1* from Explorer 2) Run my code to update clipboard with *Image2* 3) Paste operation in Wordpad application or Explorer ends up with only *Image1* Any clues please?Am i missing something? Also how about the OleSetClipboard()? Do you guys think it will improve my case? On Thu, May 22, 2014 at 1:02 AM, game4 sale wrote: > Thank you very much for your time. > > Thats strange. For the login user, i think its same. In my Taskmanager, > under User tab, both the processes are running under same user. > > I also tried to run my script from command prompt with Admin previlege. > Still same, i cannot paste the file in Explorer. > > Also, i found out another problem in my code. I can paste the image in > Wordpad application only if the last clipboard content was text. > If the last one was image, i cannot paste my new image. It pastes only the > old image. > > > > > On Thu, May 22, 2014 at 12:29 AM, Tim Roberts wrote: > >> game4 sale wrote: >> >> >> >> I am trying to copy an image file to windows clipboard using my code >> and paste it manually in any folder in windows explorer. I am using *Windows >> 8* *64bit *laptop, running *Python 2.7 *and *pywin32-218* for win32 APIs >> >> I managed to paste my file in Wordpad application. But, i cannot paste >> inside windows explorer. The Paste menu is disabled. Any help/suggestions >> would be much appreciated. >> >> >> I'm confused. I just ran your exact code on Win 7 64 with Python 2.7.5 >> 32, unchanged except for the file name, and it worked perfectly. >> >> Is the script running as the same login user as Explorer? >> >> -- >> Tim Roberts, timr at probo.com >> Providenza & Boekelheide, Inc. >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From skippy.hammond at gmail.com Thu May 22 08:15:16 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Thu, 22 May 2014 16:15:16 +1000 Subject: [python-win32] Not able to paste file in windows explorer using SetClipboardData In-Reply-To: References: <537CD45F.3080204@probo.com> Message-ID: <537D95F4.90208@gmail.com> I'd suggest you experiment with EnumClipboardFormats() and see all the formats actually in the clipboard - I'm guessing there is another format preferred over CF_HDROP. Similarly, you probably want to call EmptyClipboard so the other formats which refer to the initial image are removed (and if you do this, you might find it unnecessary to use a different format for your replacement image) HTH, Mark On 22/05/2014 1:21 PM, game4 sale wrote: > I tested my code today on Win 7 64 bit, and it worked almost perfect > like Tim said. > > If the previous clipboard content was Text, my code works perfectly. > > The failure part is: > 1) Copy *Image1* from Explorer > 2) Run my code to update clipboard with *Image2* > 3) Paste operation in Wordpad application or Explorer ends up with only > *Image1* > > Any clues please?Am i missing something? > Also how about the OleSetClipboard()? Do you guys think it will improve > my case? > * > * > > > On Thu, May 22, 2014 at 1:02 AM, game4 sale > wrote: > > Thank you very much for your time. > > Thats strange. For the login user, i think its same. In my > Taskmanager, under User tab, both the processes are running under > same user. > > I also tried to run my script from command prompt with Admin > previlege. Still same, i cannot paste the file in Explorer. > > Also, i found out another problem in my code. I can paste the image > in Wordpad application only if the last clipboard content was text. > If the last one was image, i cannot paste my new image. It pastes > only the old image. > > > > > On Thu, May 22, 2014 at 12:29 AM, Tim Roberts > wrote: > > game4 sale wrote: >> >> >> I am trying to copy an image file to windows clipboard using >> my code and paste it manually in any folder in windows >> explorer. I am using *Windows 8* *64bit *laptop, running >> *Python 2.7 *and*pywin32-218* for win32 APIs >> >> I managed to paste my file in Wordpad application. But, i >> cannot paste inside windows explorer. The Paste menu is >> disabled. Any help/suggestions would be much appreciated. >> > > I'm confused. I just ran your exact code on Win 7 64 with > Python 2.7.5 32, unchanged except for the file name, and it > worked perfectly. > > Is the script running as the same login user as Explorer? > > -- > Tim Roberts,timr at probo.com > Providenza & Boekelheide, Inc. > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > > > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > From gandalf at shopzeus.com Mon May 26 21:16:11 2014 From: gandalf at shopzeus.com (=?ISO-8859-2?Q?Nagy_L=E1szl=F3_Zsolt?=) Date: Mon, 26 May 2014 21:16:11 +0200 Subject: [python-win32] win32serviceutil: ImportError: DLL load failed: The specified module could not be found Message-ID: <538392FB.8090502@shopzeus.com> Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32 pywin32-219 (64-bit) taken from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32 Operating system: Windows 7 64bit Path=C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\SlikSvn\bin;C:\texlive\2013\bin\win32;c:\Python34\DLLs;c:\Python27\DLLs If I start up Python 3.4 and do "import win32service" then I get: ImportError: DLL load failed: The specified module could not be found (The actual error message is in Hungarian because I have a hungarian windows but I guess that doesn't count) If I do the same with Python 2.7 then it succeeds. This is a cross post from the main python-list. Thanks, Laszlo From skippy.hammond at gmail.com Tue May 27 04:16:54 2014 From: skippy.hammond at gmail.com (Mark Hammond) Date: Tue, 27 May 2014 12:16:54 +1000 Subject: [python-win32] win32serviceutil: ImportError: DLL load failed: The specified module could not be found In-Reply-To: <538392FB.8090502@shopzeus.com> References: <538392FB.8090502@shopzeus.com> Message-ID: <5383F596.6070001@gmail.com> I see on python-list that this was solved by running the postInstall script manually. However, I'm surprised that is necessary - build 219 has a work-around for Python 3.4 not running the post-install script, so that should work. I'll try and look into how this might have happened, but if you would like to help in the meantime, could you please re-run the pywin32 installer and (a) verify it prompted you to elevate, and (b) at the very end of the install process, verify that the installer shows you the output of the post-install script rather than an empty box? Thanks, Mark On 27/05/2014 5:16 AM, Nagy L?szl? Zsolt wrote: > Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 > bit (AMD64)] on win32 > pywin32-219 (64-bit) taken from here: > http://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32 > > Operating system: Windows 7 64bit > > Path=C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA > Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program > Files\SlikSvn\bin;C:\texlive\2013\bin\win32;c:\Python34\DLLs;c:\Python27\DLLs > > > If I start up Python 3.4 and do "import win32service" then I get: > > ImportError: DLL load failed: The specified module could not be found > > (The actual error message is in Hungarian because I have a hungarian > windows but I guess that doesn't count) > > If I do the same with Python 2.7 then it succeeds. > > This is a cross post from the main python-list. > > Thanks, > > Laszlo > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 From gandalf at shopzeus.com Tue May 27 12:30:39 2014 From: gandalf at shopzeus.com (=?windows-1252?Q?Nagy_L=E1szl=F3_Zsolt?=) Date: Tue, 27 May 2014 12:30:39 +0200 Subject: [python-win32] win32serviceutil: ImportError: DLL load failed: The specified module could not be found In-Reply-To: <5383F596.6070001@gmail.com> References: <538392FB.8090502@shopzeus.com> <5383F596.6070001@gmail.com> Message-ID: <5384694F.9020304@shopzeus.com> > I see on python-list that this was solved by running the postInstall > script manually. However, I'm surprised that is necessary - build 219 > has a work-around for Python 3.4 not running the post-install script, > so that should work. Yes, this was solved by manually running the post install script. > > I'll try and look into how this might have happened, but if you would > like to help in the meantime, could you please re-run the pywin32 > installer and (a) verify it prompted you to elevate, and (b) at the > very end of the install process, verify that the installer shows you > the output of the post-install script rather than an empty box? I have downloaded the installer again, just to be sure. ( http://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32 ) The post install script seems to be empty see 04.png attached. I have also tried to run the installer as administrator => the post install script box is empty -------------- next part -------------- A non-text attachment was scrubbed... Name: 01.png Type: image/png Size: 25707 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 02.png Type: image/png Size: 20008 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 03.png Type: image/png Size: 19482 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 04.png Type: image/png Size: 19167 bytes Desc: not available URL: From hartmut.niemann at siemens.com Tue May 27 14:27:45 2014 From: hartmut.niemann at siemens.com (Niemann, Hartmut) Date: Tue, 27 May 2014 12:27:45 +0000 Subject: [python-win32] Excel Characters object Message-ID: <1AE3002F400CE4498072DFDF74A843CC1F2DA19A@DEFTHW99EH3MSX.ww902.siemens.net> Hello! I want to create an Excel file through the python COM interface. I can open the file, fill the cells, save the file. Now I want to color single characters in the cell content. In VBA ( see http://stackoverflow.com/questions/7618121/excel-vba-change-color-of-certain-characters-in-a-cell) I would do Cell.Characters(i, 1).Font.Color = vbRed How does that translate to Python? mycell.Characters[x:y] does not work, nor anything else I tried. mycell.Characters is a "win32com.gen_py.Microsoft Excel 12.0 Object Library.Characters instance", but what can I do with it? In the gen_py generated interface, the Characters class is defined as: ----8<-------------------- class Characters(DispatchBaseClass): CLSID = IID('{00020878-0000-0000-C000-000000000046}') coclass_clsid = None def Delete(self): return self._ApplyTypes_(117, 1, (12, 0), (), u'Delete', None,) def Insert(self, String=defaultNamedNotOptArg): return self._ApplyTypes_(252, 1, (12, 0), ((8, 1),), u'Insert', None,String ) _prop_map_get_ = { # Method 'Application' returns object of type 'Application' "Application": (148, 2, (13, 0), (), "Application", '{00024500-0000-0000-C000-000000000046}'), "Caption": (139, 2, (8, 0), (), "Caption", None), "Count": (118, 2, (3, 0), (), "Count", None), "Creator": (149, 2, (3, 0), (), "Creator", None), # Method 'Font' returns object of type 'Font' "Font": (146, 2, (9, 0), (), "Font", '{0002084D-0000-0000-C000-000000000046}'), "Parent": (150, 2, (9, 0), (), "Parent", None), "PhoneticCharacters": (1522, 2, (8, 0), (), "PhoneticCharacters", None), "Text": (138, 2, (8, 0), (), "Text", None), } _prop_map_put_ = { "Caption": ((139, LCID, 4, 0),()), "PhoneticCharacters": ((1522, LCID, 4, 0),()), "Text": ((138, LCID, 4, 0),()), } def __iter__(self): "Return a Python iterator for this object" try: ob = self._oleobj_.InvokeTypes(-4,LCID,3,(13, 10),()) except pythoncom.error: raise TypeError("This object does not support enumeration") return win32com.client.util.Iterator(ob, None) #This class has Count() property - allow len(ob) to provide this def __len__(self): return self._ApplyTypes_(*(118, 2, (3, 0), (), "Count", None)) #This class has a __len__ - this is needed so 'if object:' always returns TRUE. def __nonzero__(self): return True ----8<-------------------- Mit freundlichen Gr??en Dr. Hartmut Niemann Siemens AG Infrastructure & Cities Sector Rail Systems Division Locomotives and Components IC RL LOC EN CCI 1 Werner-von-Siemens-Str. 67 91052 Erlangen, Deutschland Tel: +49 9131 7-34264 Fax: +49 9131 7-26254 mailto:hartmut.niemann at siemens.com Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Klaus Helmrich, Hermann Requardt, Siegfried Russwurm, Ralf P. Thomas; Sitz der Gesellschaft: Berlin und M?nchen, Deutschland; Registergericht: Berlin Charlottenburg, HRB 12300, M?nchen, HRB 6684; WEEE-Reg.-Nr. DE 23691322 -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Tue May 27 19:19:33 2014 From: timr at probo.com (Tim Roberts) Date: Tue, 27 May 2014 10:19:33 -0700 Subject: [python-win32] Excel Characters object In-Reply-To: <1AE3002F400CE4498072DFDF74A843CC1F2DA19A@DEFTHW99EH3MSX.ww902.siemens.net> References: <1AE3002F400CE4498072DFDF74A843CC1F2DA19A@DEFTHW99EH3MSX.ww902.siemens.net> Message-ID: <5384C925.8020206@probo.com> Niemann, Hartmut wrote: > > > I want to create an Excel file through the python COM interface. > > I can open the file, fill the cells, save the file. > > > > Now I want to color single characters in the cell content. > > > > In VBA ( see > > http://stackoverflow.com/questions/7618121/excel-vba-change-color-of-certain-characters-in-a-cell) > > I would do > > Cell.Characters(i, 1).Font.Color = vbRed > > > > How does that translate to Python? > > mycell.Characters[x:y] does not work, nor anything else I tried. > That's interesting. Theoretically, the Characters object should have a __call__ method, so you could call it exactly like in VB: Cell.Characters(i,1) but I don't see that in the generated COM interface. That's going to be an ugly one to chase down. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jim at JC-Bell.com Tue May 27 16:10:07 2014 From: Jim at JC-Bell.com (Jim Bell) Date: Tue, 27 May 2014 09:10:07 -0500 Subject: [python-win32] win32serviceutil: ImportError: DLL load failed: The specified module could not be found In-Reply-To: <5383F596.6070001@gmail.com> References: <538392FB.8090502@shopzeus.com> <5383F596.6070001@gmail.com> Message-ID: <53849CBF.7050305@JC-Bell.com> I encountered the same mysterious symptom, but in a completely different context. DLLs mis-matched. Might be of use to you... http://curl.haxx.se/mail/curlpython-2014-05/0010.html On 2014-05-26 9:16 PM, Mark Hammond wrote: > I see on python-list that this was solved by running the postInstall > script manually. However, I'm surprised that is necessary - build 219 > has a work-around for Python 3.4 not running the post-install script, > so that should work. > > I'll try and look into how this might have happened, but if you would > like to help in the meantime, could you please re-run the pywin32 > installer and (a) verify it prompted you to elevate, and (b) at the > very end of the install process, verify that the installer shows you > the output of the post-install script rather than an empty box? > > Thanks, > > Mark > > On 27/05/2014 5:16 AM, Nagy L?szl? Zsolt wrote: >> Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 >> bit (AMD64)] on win32 >> pywin32-219 (64-bit) taken from here: >> http://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32 >> >> Operating system: Windows 7 64bit >> >> Path=C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA >> Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program >> >> Files\SlikSvn\bin;C:\texlive\2013\bin\win32;c:\Python34\DLLs;c:\Python27\DLLs >> >> >> >> If I start up Python 3.4 and do "import win32service" then I get: >> >> ImportError: DLL load failed: The specified module could not be found >> >> (The actual error message is in Hungarian because I have a hungarian >> windows but I guess that doesn't count) >> >> If I do the same with Python 2.7 then it succeeds. >> >> This is a cross post from the main python-list. >> >> Thanks, >> >> Laszlo >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> https://mail.python.org/mailman/listinfo/python-win32 > > From hartmut.niemann at siemens.com Wed May 28 09:32:49 2014 From: hartmut.niemann at siemens.com (Niemann, Hartmut) Date: Wed, 28 May 2014 07:32:49 +0000 Subject: [python-win32] Excel Characters object In-Reply-To: <5384C925.8020206@probo.com> References: <1AE3002F400CE4498072DFDF74A843CC1F2DA19A@DEFTHW99EH3MSX.ww902.siemens.net> <5384C925.8020206@probo.com> Message-ID: <1AE3002F400CE4498072DFDF74A843CC1F2DA2ED@DEFTHW99EH3MSX.ww902.siemens.net> Tim Roberts wrote: >Niemann, Hartmut wrote: ? >>I want to create an Excel file through the python COM interface. >>I can open the file, fill the cells, save the file. ? >>Now I want to color single characters in the cell content. ? >>In VBA ( see >>http://stackoverflow.com/questions/7618121/excel-vba-change-color-of-certain-characters-in-a-cell) >>I would do >>Cell.Characters(i, 1).Font.Color = vbRed ? >>How does that translate to Python? >>mycell.Characters[x:y] does not work, nor anything else I tried. >That's interesting.? Theoretically, the Characters object should have a __call__ method, so you could call it exactly like in VB: >??? Cell.Characters(i,1) >but I don't see that in the generated COM interface. That is what the error message is: File "D:\PRJ\DPS\bin\itm_diff.py", line 252, in diff_output_table_excel charrange = chars(1,2) ## this should work but doesn''t yet. AttributeError: Characters instance has no __call__ method I tried again and removed the make_py generated interface, now I get a different error: File "D:\PRJ\DPS\bin\itm_diff.py", line 252, in diff_output_table_excel charrange = chars(1,2) ## this should work but doesn''t yet. File "D:\bin\Python27\lib\site-packages\win32com\client\dynamic.py", line 192, in __call__ return self._get_good_object_(self._oleobj_.Invoke(*allArgs),self._olerepr_.defaultDispatchName,None) pywintypes.com_error: (-2147352573, 'Mitglied nicht gefunden.', None, None) >That's going to be an ugly one to chase down. Where can we start the chase? With best regards Hartmut Niemann From nulla.epistola at web.de Wed May 28 17:12:07 2014 From: nulla.epistola at web.de (Sibylle Koczian) Date: Wed, 28 May 2014 17:12:07 +0200 Subject: [python-win32] Build 219, adodbapi: no module apibase Message-ID: <5385FCC7.3080401@web.de> Hello, I just installed Python 3.4.1 and pywin32, using pywin32-219.win-amd64-py3.4.exe. No problems, no error messages during installation. When I try to use adodbapi, I get an ImportError: Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import adodbapi Traceback (most recent call last): File "", line 1, in import adodbapi File "C:\Python34\lib\site-packages\adodbapi\__init__.py", line 16, in from .apibase import apilevel, threadsafety, paramstyle ImportError: No module named 'adodbapi.apibase' >>> In fact there is no file called "apibase" in my Python34 directory. What can I do? Thank you, Sibylle From vernondcole at gmail.com Thu May 29 11:33:56 2014 From: vernondcole at gmail.com (Vernon D. Cole) Date: Thu, 29 May 2014 10:33:56 +0100 Subject: [python-win32] Build 219, adodbapi: no module apibase In-Reply-To: <5385FCC7.3080401@web.de> References: <5385FCC7.3080401@web.de> Message-ID: Arrgh! You are quite correct. After completely removing and re-installing python 3.4, I get exactly the same result. It would appear that my changes in the layout of adodbapi were not updated in pywin32's distribution setup, but that error was masked in my testing by pre-existing files on my test system. I will communicate with Mark off-line about how I can fix this so that testing is more reliable. You can get the other files you need from the adodbapi package in PyPi or sourceforge... (in Python 3.4) py -3 -m pip install adodbapi (if you have pip installed) pip install adodbapi --upgrade (otherwise) http://sourceforge.net/projects/adodbapi/files/latest/download?source=dlp Note that there is no difference between adodbapi 2.6.0.6 and 2.6.0.7, except that the latter will download directly from pypi and not try using the (broken) url link. My profound apologies. Vernon On Wed, May 28, 2014 at 4:12 PM, Sibylle Koczian wrote: > Hello, > > I just installed Python 3.4.1 and pywin32, using > pywin32-219.win-amd64-py3.4.exe. No problems, no error messages during > installation. > > When I try to use adodbapi, I get an ImportError: > > Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 > bit (AMD64)] on win32 > Type "copyright", "credits" or "license()" for more information. > >>> import adodbapi > Traceback (most recent call last): > File "", line 1, in > import adodbapi > File "C:\Python34\lib\site-packages\adodbapi\__init__.py", line 16, in > > from .apibase import apilevel, threadsafety, paramstyle > ImportError: No module named 'adodbapi.apibase' > >>> > > In fact there is no file called "apibase" in my Python34 directory. > > What can I do? > > Thank you, > Sibylle > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nulla.epistola at web.de Thu May 29 12:02:16 2014 From: nulla.epistola at web.de (Sibylle Koczian) Date: Thu, 29 May 2014 12:02:16 +0200 Subject: [python-win32] Build 219, adodbapi: no module apibase In-Reply-To: References: <5385FCC7.3080401@web.de> Message-ID: <538705A8.8060906@web.de> Am 29.05.2014 11:33, schrieb Vernon D. Cole: > (if you have pip installed) > pip install adodbapi --upgrade > Worked, thank you very much. This looks as if I could install adodbapi without the rest of the windows extensions - right or wrong? Greetings, Sibylle From vernondcole at gmail.com Thu May 29 12:49:18 2014 From: vernondcole at gmail.com (Vernon D. Cole) Date: Thu, 29 May 2014 11:49:18 +0100 Subject: [python-win32] Build 219, adodbapi: no module apibase In-Reply-To: <538705A8.8060906@web.de> References: <5385FCC7.3080401@web.de> <538705A8.8060906@web.de> Message-ID: Ado is called using COM. adodbapi makes heavy use of the COM interface capabilities of pywin32 when running on CPython, or the built-in COM interface on IronPython. It requires one of the two. On Thu, May 29, 2014 at 11:02 AM, Sibylle Koczian wrote: > Am 29.05.2014 11:33, schrieb Vernon D. Cole: > > (if you have pip installed) >> pip install adodbapi --upgrade >> >> > Worked, thank you very much. This looks as if I could install adodbapi > without the rest of the windows extensions - right or wrong? > > Greetings, > > Sibylle > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: