473,803 Members | 2,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

win32com/python different behavour.

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.win 32com, 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(p aram1,param2) <-- params as per 'intellisense' would
return
(True,'123xyz')

now
xx.GetMACAddr(p aram1,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.

Nov 9 '06 #1
1 997
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.win 32com, 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(p aram1,param2) <-- params as per 'intellisense' would
return
(True,'123xyz')

now
xx.GetMACAddr(p aram1,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
Nov 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5199
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly remove old version (as well as the mx libraries I had installed). I then installed the new version as a user with the Administrator role. I know I'm technically not supposed to install to a directory with a space in the name, but it worked fine for...
0
1913
by: Paul McGuire | last post by:
Software versions: Python - 2.3.3 win32all extensions - build 163 OS- Win2000 SP4 I am having trouble in accessing a customer's proprietary COM type library. After running makepy against the customer's typelib, I am still unable to create a typed object, getting the following Python traceback (I have to sanitize the customer's product, I have replaced it with XYZ):
1
3272
by: Patrick | last post by:
I am investigating a web-based app wherein I wanted to provide html form frontends to an Excel spreadsheet sitting on a MS Windows server; with each authenticated HTTP user having thier own "invisible" copy of the spreadsheet changeable via form POST via COM automation object (via Python) - then after recalculating - present the spreadsheet results in HTML. The whole idea to 1: isolate the user from having to have Excel, and 2: avoiding...
0
1363
by: neblackcat | last post by:
This is a heads-up on a possible memory corruption type of bug in recent and present versions of Python/win32com. I dont know if its general, or specific to using win32com.client to access CDO as my example does. My script was tiny - it just opens a MAPI/CDO session and traverses the email folders - but it keeps crashing Python at random places. After 2 days of trying everything without success, I've finally discovered that it depends...
2
7101
by: Sibylle Koczian | last post by:
Hello, I've installed Python 2.4 and the win32 extensions, using administrator rights, under Windows XP in "C:\Programme". As this is a directory without spaces I didn't expect any problems. But now I can't _use_ win32com as a normal user, because normal users can't write there: PythonWin 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32. Portions Copyright 1994-2004 Mark Hammond (mhammond@skippinet.com.au) -
2
2255
by: floris.vannee | last post by:
Hi, Is it possible to create a com server in python and then access that server using VB .NET, for example using the following code. A very basic com server i found in a tutorial about win32com: class HelloWorld: _reg_clsid_ = "{7CC9F362-486D-11D1-BB48-0000E838A65F}" _reg_desc_ = "Python Test COM Server"
4
6922
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File "<interactive input>", line 1, in ?
12
130003
by: vithi | last post by:
Hi Any one tell me where I can get (or download) python modules win32com or win32com.client because I have to use "Dispatch" thanks
11
7751
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which enabled me to the contacts at least list. I had to root around to discover CdoDefaultFolderContacts (though it was guessable; how could I enumerate win32com.client.constants?). I now want to work through the Contacts in Outlook patching in...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10309
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.