Wednesday, March 08, 2006

Released 0.2.5 prior to Boston-PIG meeting

I wanted to roll up my various changes before I give my presentation to Boston-Pig meeting this Thursday.

Also I will be traveling next Monday to Europe for work, that might mean that I can do more work on pywinauto - but it also might mean that I can do much less.

Going forward I have more refactoring to do (probably code breaking - but I can leave methods in and deprecate them for a release or two), and I still need to work on the functionality that allows a script to work unchanged on different langauges.

Have fun :-) - and don't worry about asking me questions or letting me know if you are using pywinauto - I really really don't get a lot of mails :-) (It is only since releasing my own package that I notice how little feedback I have given to others in the past!).

2 comments:

  1. To use pywinauto with python-2.3 I had to change some 2.4'ism:


    application.py:
    for process, name in reversed(modules):
    2.3: for process, name in [_i for _i in modules[::-1]]:

    findbestmatch.py:
    return set(names)
    2.3: return dict(zip(names,[None]*len(names))).keys()

    common_controls.py:
    texts.extend(elem.Text() for elem in elements)
    2.3: texts.extend([elem.Text() for elem in elements])

    repeated_hotkey.py:
    dlgAvailable = allChars.difference(hotkeys)
    dlgAvailable.difference_update(set("-& _"))
    2.3: dlgAvailable = [_i for _i in allChars if _i not in hotkeys]
    2.3: dlgAvailable = [_i for _i in dlgAvailable if _i not in "-& _" ]
    2.3: (all sets() has to be changed)

    win32structures.py:
    from ctypes import (
    c_int, c_uint, c_long, c_ulong, c_void_p, c_wchar, c_char,
    c_ubyte, c_ushort, c_wchar_p,
    POINTER, sizeof, alignment, Union)
    2.3: from ctypes import c_int, c_uint, c_long, c_ulong, c_void_p, c_wchar, c_char, c_ubyte, c_ushort, c_wchar_p, POINTER, sizeof, alignment, Union

    Regards,

    anonymous

    ReplyDelete
  2. This was something that I was going to look into at some time - I wasn't sure how much 2.4'isms I was using.

    application.py:
    Changed to use modules.reverse() before the loop.

    findbestmatch.py:
    Changed to use Set from sets module (sets.Set) which was available in 2.3

    common_controls.py:
    Oops - this was a typo - I hadn't meant to use a generator expression! Changed as you suggested.

    repeated_hotkey.py
    used sets.Set as above.

    win32structures.py
    I hadn't realized this was a 2.4 ism - I changed to split lines using '\' as the last line of the character

    ReplyDelete