Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > win32com/python different behavour.

Reply
Thread Tools

win32com/python different behavour.

 
 
bli
Guest
Posts: n/a
 
      11-09-2006
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.

 
Reply With Quote
 
 
 
 
Roger Upole
Guest
Posts: n/a
 
      11-10-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Different languages in different controls chanmmn ASP .Net 2 09-07-2004 07:24 PM
Different responses from different systems Tigerhillside Perl 3 02-23-2004 01:56 AM
Re: How do I show different user control on different querystring ? Kevin Spencer ASP .Net 0 08-25-2003 12:49 PM
Re: How do I show different user control on different querystring ? Dotnetjunky ASP .Net 0 08-25-2003 12:22 PM
Bind different rows to different data sources in data grid AD ASP .Net 1 08-23-2003 10:34 PM



Advertisments