anotherCoder
anotherCoder

Reputation: 732

pywinauto installation roadblock

I'm trying to install Pywinauto on my computer so that I can do some testing on it. But the problem is I keep getting the following error, everytime I try to install it.

C:\Users\Ganesha>python g:\pywinauto\pywinauto-0.4.0\pywinauto-0.4.0\setup.py install
  File "g:\pywinauto\pywinauto-0.4.0\pywinauto-0.4.0\setup.py", line 104
    except ImportError, e:
                      ^
SyntaxError: invalid syntax

I thought that there were dependencies, so thought I would install Ctypes and sendkey and then try.

firstly, am I proceeding in the right direction

so I installed Ctypes from : http://starship.python.net/crew/theller/ctypes/ straight forwards, an msi file and installed.

But, sendkeys, I'm not able to browse/visit the page mentioned.

Is there a problem with the page?? if not what am I doing wrong?? where else can I get sendkeys from???

I'm using Python 3.2 on a Windows 7 machine.

Please help me and guide me. If this is a repeated question/query please point me to the previous thread/question and pardon my ignorance.

Regards, Vinu

Upvotes: 2

Views: 1725

Answers (2)

Uku Loskit
Uku Loskit

Reputation: 42040

Seems like pywinauto is for python <3 because the exception handling syntax is not applicable for Python 3 and thus the error you are seeing.

See PEP 3110:

PEP 3110: Catching exceptions. You must now use except SomeException as variable instead of except SomeException, variable. Moreover, the variable is explicitly deleted when the except block is left.

You should try using Python2.* instead.

Upvotes: 2

Related Questions