py2exe + pywinauto + sendkeys issue

H

hellt

Hi all
i have a problem with this modules py2exe + pywinauto + sendkeys used
together.

In my script i'm using this expression
app.window_(title="SJphone").Edit.TypeKeys("Test is
running",with_spaces=True)

TypeKeys is using SendKeys module i suppose.

my setup.py looks like that:

from distutils.core import setup
import py2exe

setup(
options = {"py2exe": {"compressed": 1,
"optimize": 0,
"bundle_files": 1,
"packages": ["encodings", "pywinauto",
"pywinauto.controls", "pywinauto.tests"] } },
zipfile = None,
console=["hosts.py"]
)



and when i'm trying to run my hosts.exe i'm getting this traceback


Traceback (most recent call last):
File "hosts.py", line 524, in <module>
main()
File "hosts.py", line 517, in main
TestCase3_1()
File "hosts.py", line 421, in TestCase3_1
SJstart()
File "hosts.py", line 36, in SJstart
app.window_(title="SJphone").Edit.TypeKeys("Test is
running",with_spaces=Tru
e)
File "pywinauto\controls\HwndWrapper.pyc", line 928, in TypeKeys
NameError: global name 'SendKeys' is not defined


are there any workarounds on that?
 
G

Gabriel Genellina

i have a problem with this modules py2exe + pywinauto + sendkeys used
together.

In my script i'm using this expression
app.window_(title="SJphone").Edit.TypeKeys("Test is
running",with_spaces=True)

TypeKeys is using SendKeys module i suppose.

Does it work as a normal script, without using py2exe?
my setup.py looks like that:

from distutils.core import setup
import py2exe

setup(
options = {"py2exe": {"compressed": 1,
"optimize": 0,
"bundle_files": 1,
"packages": ["encodings", "pywinauto",
"pywinauto.controls", "pywinauto.tests"] } },
zipfile = None,
console=["hosts.py"]
)

Perhaps you have to include SendKeys explicitely. I think pywinauto
doesn't require SendKeys, but uses it if already installed.
 
H

hellt

i have a problem with this modules py2exe + pywinauto + sendkeys used
together.
In my script i'm using this expression
app.window_(title="SJphone").Edit.TypeKeys("Test is
running",with_spaces=True)
TypeKeys is using SendKeys module i suppose.

Does it work as a normal script, without using py2exe?
my setup.py looks like that:
from distutils.core import setup
import py2exe
setup(
options = {"py2exe": {"compressed": 1,
"optimize": 0,
"bundle_files": 1,
"packages": ["encodings", "pywinauto",
"pywinauto.controls", "pywinauto.tests"] } },
zipfile = None,
console=["hosts.py"]
)

Perhaps you have to include SendKeys explicitely. I think pywinauto
doesn't require SendKeys, but uses it if already installed.

i tried this:

"packages": ["encodings", "pywinauto", "SendKeys",
"pywinauto.controls", "pywinauto.tests"]

But there was an error too(
 
H

hellt

i have a problem with this modules py2exe + pywinauto + sendkeys used
together.
In my script i'm using this expression
app.window_(title="SJphone").Edit.TypeKeys("Test is
running",with_spaces=True)
TypeKeys is using SendKeys module i suppose.

Does it work as a normal script, without using py2exe?
my setup.py looks like that:
from distutils.core import setup
import py2exe
setup(
options = {"py2exe": {"compressed": 1,
"optimize": 0,
"bundle_files": 1,
"packages": ["encodings", "pywinauto",
"pywinauto.controls", "pywinauto.tests"] } },
zipfile = None,
console=["hosts.py"]
)

Perhaps you have to include SendKeys explicitely. I think pywinauto
doesn't require SendKeys, but uses it if already installed.

pywinauto uses sendkeys when performs TypeKeys function.
when i include sendkeys to my package's list i have an error posted
below:

"No module named SendKeys"
 
H

hellt

En Mon, 17 Mar 2008 08:56:26 -0200, hellt <[email protected]> escribi�:
Does it work as a normal script, without using py2exe?
my setup.py looks like that:
from distutils.core import setup
import py2exe
setup(
options = {"py2exe": {"compressed": 1,
"optimize": 0,
"bundle_files": 1,
"packages": ["encodings", "pywinauto",
"pywinauto.controls", "pywinauto.tests"] } },
zipfile = None,
console=["hosts.py"]
)
Perhaps you have to include SendKeys explicitely. I think pywinauto
doesn't require SendKeys, but uses it if already installed.

pywinauto uses sendkeys when performs TypeKeys function.
when i include sendkeys to my package's list i have an error posted
below:

"No module named SendKeys"



ok.. all is ok.
i have just reinstall sendkeys.
 
G

Gabriel Genellina

pywinauto uses sendkeys when performs TypeKeys function.
when i include sendkeys to my package's list i have an error posted
below:

"No module named SendKeys"

Does your script actually work *without* py2exe?
SendKeys is a separate package that you have to download and install
separately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top