win32com/python different behavour.

B

bli

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.
 
R

Roger Upole

bli said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top