FAQ
I have fixed the win32com makepy problem with win32all-141. It is
available at

http://users.bigpond.net.au/mhammond/win32all-142.exe

I have no idea how long it will work for - win32all-141.exe was still
there, even when it could not be downloaded. NFI :) I am still locked
out of my starship account, so I apologize for all this messing around.

Mark.

Search Discussions

  • Carl Caulkett at Jan 5, 2002 at 12:47 pm
    In article <3C368646.5000400 at skippinet.com.au>,
    mhammond at skippinet.com.au says...
    I have fixed the win32com makepy problem with win32all-141. It is
    available at

    http://users.bigpond.net.au/mhammond/win32all-142.exe

    I have no idea how long it will work for - win32all-141.exe was still
    there, even when it could not be downloaded. NFI :) I am still locked
    out of my starship account, so I apologize for all this messing around.
    Got it, installed it and it seems to work. Thanks very much for putting
    this up again, Mark - I've been battling with trying to build from the
    CVS sources, with some success, but even though I enjoy a challenge as
    much as the next man, there is a limit to how much interaction with VC++
    I can take, being a loyal Delphi developer <g>.

    --
    Cheers,
    Carl
  • Carl Caulkett at Jan 5, 2002 at 3:55 pm
    In article <3C368646.5000400 at skippinet.com.au>,
    mhammond at skippinet.com.au says...
    I have fixed the win32com makepy problem with win32all-141. It is
    available at

    http://users.bigpond.net.au/mhammond/win32all-142.exe

    I have no idea how long it will work for - win32all-141.exe was still
    there, even when it could not be downloaded. NFI :) I am still locked
    out of my starship account, so I apologize for all this messing around.

    Hi Mark,

    One small issue so far. I am seeing multiple entries in the popup
    attribute window after pressing the '.' key. It appears to be related to
    levels of inheritence. An example explains it best:

    l = list()
    l.+----------
    append
    append
    count
    ...
    class list2(list):
    pass
    l = list2()
    l.+----------
    append
    append
    append
    count
    ...
    class list3(list2):
    pass
    l = list3()
    l.+----------
    append
    append
    append
    append
    count
    ...
    The problem also occurs with the new 2.2 properties, and occurs for
    classic classes, new object descended classes, and built-in type
    descended classes. The problem does not occur with simple attributes.

    <a few minutes later>

    I've had a look in the source and have come up with a patch that seems
    to fix the problem:

    D:\Python22\Pythonwin\pywin\scintilla\view.py (line 407)

    #------------------------------------------------------
    # Fix to remove duplicate entries
    #------------------------------------------------------
    # OLD CODE
    #------------------------------------------------------
    # if hasattr(ob, "__class__"):
    # items = items + _get_class_attributes(ob.__class__)
    #------------------------------------------------------
    # NEW CODE BEGIN
    #------------------------------------------------------
    allitems = []
    allitems.extend(_get_class_attributes(ob.__class__))
    for item in allitems:
    if not item in items:
    items = items + item
    #------------------------------------------------------
    # NEW CODE END
    #------------------------------------------------------

    HTH.

    --
    Cheers,
    Carl
  • Carl Caulkett at Jan 5, 2002 at 11:08 pm
    In article <MPG.16a13250220c63989896cd at newnews.dircon.co.uk>,
    carlca at dircon.co.uk says...

    Correction:

    #------------------------------------------------------
    # Fix to remove duplicate entries
    #------------------------------------------------------
    # OLD CODE
    #------------------------------------------------------
    # if hasattr(ob, "__class__"):
    # items = items + _get_class_attributes(ob.__class__)
    #------------------------------------------------------
    # NEW CODE BEGIN
    #------------------------------------------------------
    if hasattr(ob, "__class__"):
    allitems = []
    allitems.extend(_get_class_attributes(ob.__class__))
    for item in allitems:
    if not item in items:
    items = items + item
    #------------------------------------------------------
    # NEW CODE END
    #------------------------------------------------------
  • Jason Orendorff at Jan 5, 2002 at 11:10 pm
    #------------------------------------------------------
    # NEW CODE BEGIN
    #------------------------------------------------------
    if hasattr(ob, "__class__"):
    allitems = []
    allitems.extend(_get_class_attributes(ob.__class__))
    for item in allitems:
    if not item in items:
    items = items + item
    I think you probably mean this.

    if hasattr(ob, "__class__"):
    for item in _get_class_attributes(ob.__class__):
    if item not in items:
    items.append(item)

    ## Jason Orendorff http://www.jorendorff.com/
  • Mark Hammond at Jan 7, 2002 at 5:44 am

    Carl Caulkett wrote:

    In article <MPG.16a13250220c63989896cd at newnews.dircon.co.uk>,
    carlca at dircon.co.uk says...

    Correction:

    A different patch has been checked in - thanks!

    The Pythonwin browser doesn't really work too well either :)

    Mark.
  • Carl Caulkett at Jan 6, 2002 at 1:20 am
    In article <mailman.1010272507.6806.python-list at python.org>,
    jason at jorendorff.com says...
    #------------------------------------------------------
    # NEW CODE BEGIN
    #------------------------------------------------------
    if hasattr(ob, "__class__"):
    allitems = []
    allitems.extend(_get_class_attributes(ob.__class__))
    for item in allitems:
    if not item in items:
    items = items + item
    I think you probably mean this.

    if hasattr(ob, "__class__"):
    for item in _get_class_attributes(ob.__class__):
    if item not in items:
    items.append(item)
    Your version is much more elegant, but, I'm sure that you would concede,
    functionally identical. In my defense, I was so excited at having found
    and fixed this (I am a recently converted Python devotee) that I
    neglected to put the code through my usual rigorous 3 day "before
    hitting the send button" refactoring session.

    :^)

    --
    Carl
  • Jason Orendorff at Jan 6, 2002 at 4:51 am

    Carl wrote:
    Your version is much more elegant, but, I'm sure that you would concede,
    functionally identical.
    I was just worried about

    items = items + item

    This is an error, if (as it seems) "items" is a list and "item"
    is a string.

    ## Jason Orendorff http://www.jorendorff.com/
  • Carl Caulkett at Jan 6, 2002 at 2:28 pm
    In article <mailman.1010292968.32245.python-list at python.org>,
    jason at jorendorff.com says...
    I was just worried about

    items = items + item

    This is an error, if (as it seems) "items" is a list and "item"
    is a string.
    You're right of course. The confusing thing was that PythonWin behaved
    correctly after applying this "fix". After further investigation I have
    found that the code is indeed failing at this point, but the exception
    is caught by a try except. The implication of this is that this code
    does not make any difference which is indeed what I found after
    commenting the code out altogether. Interestingly, I have found that if
    I comment out the same block of code in view.py in the 2.1 version of
    PythonWin, the code completion fails altogether, which, given that
    view.py is identical under PythonWin 2.1 and PythonWin 2.2, suggests a
    change in behaviour in the underlying Python.

    <quick check later using Python console>

    Aha! It seems that under Python 2.2, dir(obj), when applied to a class
    returns attributes for ancestor classes whereas in 2.1 it doesn't:

    Python 2.2 (#28, Dec 21 2001, 12:21:2
    Type "help", "copyright", "credits" o
    class a:
    ... a = 23
    ...
    class b(a):
    ... b = 46
    ...
    dir(b)
    ['__doc__', '__module__', 'a', 'b']
    >>>


    ActivePython 2.1.1, build 212 (A
    Python 2.1.1 (#20, Jul 26 2001,
    Type "copyright", "credits" or "
    class a:
    ... a = 23
    ...
    class b(a):
    ... b = 46
    ...
    dir(b)
    ['__doc__', '__module__', 'b']
    >>>

    I assume this is by design, although I cannot find any mention of it in
    the 2.2 docs. Comments?

    --
    Cheers,
    Carl
  • Guenter Szolderits at Jan 6, 2002 at 3:15 pm

    "Carl Caulkett" wrote:
    Aha! It seems that under Python 2.2, dir(obj), when applied to a class
    returns attributes for ancestor classes whereas in 2.1 it doesn't: [snip]
    I assume this is by design, although I cannot find any mention of it in
    the 2.2 docs. Comments?
    This is new since Python 2.2a3. From NEWS.txt:

    "The builtin dir() now returns more information, and sometimes much more,
    generally naming all attributes of an object, and all attribtes reachable
    from the object via its class, and from its class's base classes, an so on
    from them too. ..."

    G?nter
  • Carl Caulkett at Jan 6, 2002 at 3:49 pm
    In article <3c3869e0$0$22450$6e365a64 at newsreader02.highway.telekom.at>,
    g.szolderits at gmx.at says...
    "The builtin dir() now returns more information, and sometimes much more,
    generally naming all attributes of an object, and all attribtes reachable
    from the object via its class, and from its class's base classes, an so on
    from them too. ..."
    Cool. Thanks.

    --
    Carl
  • Paul Moore at Jan 6, 2002 at 8:42 pm

    On Sat, 05 Jan 2002 04:51:07 GMT, Mark Hammond wrote:

    I have fixed the win32com makepy problem with win32all-141. It is
    available at

    http://users.bigpond.net.au/mhammond/win32all-142.exe

    I have no idea how long it will work for - win32all-141.exe was still
    there, even when it could not be downloaded. NFI :) I am still locked
    out of my starship account, so I apologize for all this messing around.
    Looks good to me. Lack of win32all was the only thing holding me off
    from moving to Python 2.2. Thanks for all the work on this, Mark!

    One minor point - for Python 2.2, the "correct" place to install
    packages is in <Python Dir>\lib\site-packages (see PEP 250).
    win32all-142 still installs directly in <Python Dir>. Any chance of
    changing this for the next version?

    Paul.
  • Mark Hammond at Jan 7, 2002 at 6:00 am

    Paul Moore wrote:

    One minor point - for Python 2.2, the "correct" place to install
    packages is in <Python Dir>\lib\site-packages (see PEP 250).
    win32all-142 still installs directly in <Python Dir>. Any chance of
    changing this for the next version?

    I guess so, yes.

    Mark.
  • Ruud at Jan 11, 2002 at 6:41 am
    Mark,
    I'm using your new PythonWin version and noticed the following:
    - scripts with the extension "*.pyw" are not recognized
    - call-outs are not working for keyboards other than US

    Is there any change this will be fixed in the future?
    Ruud

    Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<3C393995.9080804 at skippinet.com.au>...
    Paul Moore wrote:
    One minor point - for Python 2.2, the "correct" place to install
    packages is in <Python Dir>\lib\site-packages (see PEP 250).
    win32all-142 still installs directly in <Python Dir>. Any chance of
    changing this for the next version?

    I guess so, yes.

    Mark.
  • Dave Hawkes at Jan 10, 2002 at 1:47 pm
    Is the source available anywhere so I can build a debug version for testing
    ?

    Thanks
    Dave Hawkes

    "Mark Hammond" <mhammond at skippinet.com.au> wrote in message
    news:3C368646.5000400 at skippinet.com.au...
    I have fixed the win32com makepy problem with win32all-141. It is
    available at

    http://users.bigpond.net.au/mhammond/win32all-142.exe

    I have no idea how long it will work for - win32all-141.exe was still
    there, even when it could not be downloaded. NFI :) I am still locked
    out of my starship account, so I apologize for all this messing around.

    Mark.
  • David Bolen at Jan 10, 2002 at 10:13 pm

    "Dave Hawkes" <daveh at cadlink.nospamrz.com.nospam.rz> writes:

    Is the source available anywhere so I can build a debug version for testing
    ?
    See the win32all pages at http://starship.python.net/crew/mhammond/win32.
    It has pointers to getting source from CVS and building from the source.

    --
    -- David
    --
    /-----------------------------------------------------------------------\
    \ David Bolen \ E-mail: db3l at fitlinxx.com /
    FitLinxx, Inc. \ Phone: (203) 708-5192 |
    / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
    \-----------------------------------------------------------------------/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 5, '02 at 4:51a
activeJan 11, '02 at 6:41a
posts16
users8
websitepython.org

People

Translate

site design / logo © 2022 Grokbase