Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9167755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:28:06+00:00 2026-06-17T15:28:06+00:00

I am using Python with win32com to access COM objects. One of the COM

  • 0

I am using Python with win32com to access COM objects. One of the COM objects is supposed to return another COM object but a tuple about the called method is returned instead. Is there a way to access the returned data?

The statement which I programmed is:

item = server.OPCHDAItems.AddItem(“TIC101”,1)

item should be the object added, an OPCHDAItem. When I print item I just get

<COMObject AddItem>

The item was added to the OPCHDAItems collection because I can see the size of the collection increasing.

From reading the docs about win32com is states taht a tuple is returned from a method call but I could not find how to access the return data from the method call.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:28:07+00:00Added an answer on June 17, 2026 at 3:28 pm

    I may be wrong but I think the OPCHDAItem has been added properly. The print is using the __repr__ or the __str__ method of the class for printing something. A COM class is automatically generated, so I guess these methods are not overloaded.

    Try to generate the interface of the COM object with the MakePy utility (see http://oreilly.com/catalog/pythonwin32/chapter/ch12.html). It will create a file that contains the description of the COM object. In this file, you should see the list of attributes and methods of the objects.

    I hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to create a com object with win32com in python. Using theses command
I'm having issues accessing a COM object using the Python win32com module, which I
I wanted to implement python com server using win32com extensions. Then consume the server
Using Python, how does one parse/access files with Linux-specific features, like ~/.mozilla/firefox/*.default ? I've
I'm using the Excel.Application COM object from a Python program to open a CSV
I'm using COM in Python and I want the object to run in background
Using Python I would like to find the date object for last Wednesday. I
I'm trying to open a write-protected ms excel 2007 file using win32com in python
I'm trying to call the text to speech API from Python using win32com.client. The
I'm using win32com.client to control an IE instance in Python. How can I click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.