win32com/python different behavour.

Discussion in 'Python' started by bli, Nov 9, 2006.

  1. bli

    bli Guest

    I have been developing an application driving a device through COM. I
    used win32com (brilliant )
    and was at a fairly advanced stage being able to access the functions
    of the device and access/ retrieve its data.
    A week or two ago I did some overdue upgrading to all the components of
    the application.win32com, python to 2.4.4 and wxpy to latest.
    Then the problem began (I think!).
    My app still accesses the device and some functions still perform as
    expected. Howeve some important data retrieval functions now behave
    very differently.
    Initially a tuple was returned, which was made into a list. This tuple
    returned (true,'1234xyz'), the first element was the success or failure
    of the operation, the second the required data.
    Now all these functions return only the boolean, True or False.
    I cannot seem to produce the tuple that initially worked extremely
    well.

    eg. initially

    xx.GetMACAddr(param1,param2) <-- params as per 'intellisense' would
    return
    (True,'123xyz')

    now
    xx.GetMACAddr(param1,param2) returns
    True (type boolean)

    I have exhausted my relative inexperience on this one.
    Any Ideas BTW VB extracts the data just fine , so I dont think that
    the Device or firmware is at fault here.
    Python has been great so far, I trust this problem is an oversight on
    my part.

    Thanks in keen anticipation for any ideas to get over this one!!

    I am in the middle of returning to Python 2.4.3 just to be sure that
    this is not the issue.
    bli, Nov 9, 2006
    #1
    1. Advertising

  2. bli

    Roger Upole Guest

    bli wrote:
    >I have been developing an application driving a device through COM. I
    > used win32com (brilliant )
    > and was at a fairly advanced stage being able to access the functions
    > of the device and access/ retrieve its data.
    > A week or two ago I did some overdue upgrading to all the components of
    > the application.win32com, python to 2.4.4 and wxpy to latest.
    > Then the problem began (I think!).
    > My app still accesses the device and some functions still perform as
    > expected. Howeve some important data retrieval functions now behave
    > very differently.
    > Initially a tuple was returned, which was made into a list. This tuple
    > returned (true,'1234xyz'), the first element was the success or failure
    > of the operation, the second the required data.
    > Now all these functions return only the boolean, True or False.
    > I cannot seem to produce the tuple that initially worked extremely
    > well.
    >
    > eg. initially
    >
    > xx.GetMACAddr(param1,param2) <-- params as per 'intellisense' would
    > return
    > (True,'123xyz')
    >
    > now
    > xx.GetMACAddr(param1,param2) returns
    > True (type boolean)
    >
    > I have exhausted my relative inexperience on this one.
    > Any Ideas BTW VB extracts the data just fine , so I dont think that
    > the Device or firmware is at fault here.
    > Python has been great so far, I trust this problem is an oversight on
    > my part.
    >
    > Thanks in keen anticipation for any ideas to get over this one!!
    >
    > I am in the middle of returning to Python 2.4.3 just to be sure that
    > this is not the issue.


    Try running makepy on the object's typelib. It may have been done
    for your previous version of python. Occasionally this can cause a
    change in the number of return values if the library is doing something
    non-standard.

    Roger
    Roger Upole, Nov 10, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rebecca Taylor

    win32com python AttributeError!

    Rebecca Taylor, Sep 8, 2003, in forum: Python
    Replies:
    0
    Views:
    914
    Rebecca Taylor
    Sep 8, 2003
  2. Stefano Masini
    Replies:
    2
    Views:
    1,259
    Markus Wankus
    Mar 6, 2004
  3. richardd
    Replies:
    1
    Views:
    309
    Larry Bates
    Apr 7, 2004
  4. Replies:
    5
    Views:
    210
    Dominick Baier [DevelopMentor]
    Feb 9, 2006
  5. s_m_b
    Replies:
    3
    Views:
    106
    Patrice
    Sep 13, 2005
Loading...

Share This Page