Hi Steve,

    It is working now,
    I decided to look in the Python Libs folder inside the SitePackages 
folder and noticed several folders, one for client and one for gen.
    Sure enough inside the gen folder was the generated WindowEyes.py file, 
so I imported it.

from comtypes.client import CreateObject
from comtypes.gen import WindowEyes
WeTts = CreateObject( "WindowEyes.Application")
    It runs without the .gen as long as it is a .py program, but when 
compiled it did not find the WindowEyes Application so,
Adding the importing the .gen folder WindowEyes.py it now works both as a 
.py program and a compiled under Pyinstaller .exe program. Able to now find 
WindowEyes using the generated or WindowEyes.py generator file...

        Bruce


Sent: Wednesday, January 02, 2013 2:53 PM
Subject: Re: Windoweyes.application In Python


Hi Steve,

    I was busy with someone and did not get back timely.
    The original create was the .client create object in comtypes. The error
only shows up after a compiling of it.
    Now, I am using pyinstaller as my compiler and using the -F command to
make an executable.
    Once compiled and running it says it can not creat the object.
Originally an error of no client.create came up.
    I am using Python2.7 and I am wondering if the version of Python is at
fault?
    I know you have made Python programs and used Python2.7, so what version
of PyInstaller was used? Or did you use another compiler?

    I guess there may be an issue of manifest, but never used one when
making an executable. It does allow the creation of the SAPI create and SAPI
works, but not Windoweyes...

        Bruce

Sent: Wednesday, January 02, 2013 1:57 PM
Subject: Re: Windoweyes.application In Python


Bruce,

As per my previous message, what do you get for the application's
output? Also, if you're assembling an executable that requires a
distutils-style setup.py script, you will likely need to add references
to the packages you're using.

Steve





On 1/2/2013 1:39 PM, BX wrote:
> Hi Steve,
>
>      It works fine for creating in comtypes, but even then when compiling
> into an executable even that fails...
>          Bruce
>
>
> Sent: Wednesday, January 02, 2013 11:24 AM
> Subject: Re: Windoweyes.application In Python
>
>
> Bruce,
>
>   From a python console I entered
>
> import win32com.client
> we = win32com.client.Dispatch("WindowEyes.Application")
>
> and got no errors. Do you have the python Win32 extensions installed? If
> so, what do you get in response to your attempt to create a WE object?
>
> Note that for executables generated with Py2exe, PyInstaller, CX Freeze,
> etc. you will probably need to generate the Window-Eyes COM interface
> beforehand and import it directly since frozen python applications will
> run much more predictably if you provide an early-bound module
> definition rather than depend on sometimes flaky late-binding in the
> Win32com package.
>
> Steve
>
>
>
>
> On 1/2/2013 10:45 AM, BX wrote:
>> Hi!
>>       I have Python2.7 and the create or object for win32 does not work.
>>       WeTts = win32com.client.Dispatch("WindowEyes.Application")
>> The above create does not work, is it because of the version of python?
>>       I can not create the application inside and executable and this
>> fails outside of it when attempting to use this format instead of the
>> comtypes import which the create fails only inside an executable of
>> python...
>>
>>      Bruce
>>
>

-- 
Stephen Clower
Product support specialist & App Development
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

Reply via email to