473,500 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Get gencache.EnsureDispatch Name ?

1 New Member
How do you get the name of a win32com.client.gencache.EnsureDispath name?

For example, I have an application named "xxxxx", and the Python object browser detects it when I use genbrowse.py & makepy.py. How do I get name like "Excel.Application"?
Dec 13 '11 #1
1 4902
bvdet
2,851 Recognized Expert Moderator Specialist
You can get the name of the application with the Application method or simply print the instance object.
Expand|Select|Wrap|Line Numbers
  1. >>> import win32com
  2. >>> xl = win32com.client.gencache.EnsureDispatch ("Excel.Application")
  3. >>> xl
  4. <win32com.gen_py.Microsoft Excel 11.0 Object Library._Application instance at 0x75385512>
  5. >>> print xl
  6. Microsoft Excel
  7. >>> xl.Application()
  8. u'Microsoft Excel'
Dec 14 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1749
by: Sam Sungshik Kong | last post by:
Hello! I use Python for ASP. When I request a page for the first time in a session, I get an error message like below. If I refresh the same page, it doesn't cause any error. I believe that...
23
63608
by: stewart.midwinter | last post by:
No doubt I've overlooked something obvious, but here goes: Let's say I assign a value to a var, e.g.: myPlace = 'right here' myTime = 'right now' Now let's say I want to print out the two...
0
2202
by: Paul Keating | last post by:
I used MakePy to generate .py support for a COM dll. That created the file 30D58DAF-B538-45F1-8EFF-F69ABA2BA798x0x1x13.py I want to be sure that this file is present and so I used MakePy -i to...
2
4117
by: list.repository | last post by:
Problem: Works fine when running python test.py but fails when executing test.exe. test.py: conn = win32com.client.gencache.EnsureDispatch('ADODB.Connection')...
2
2722
by: Ravi | last post by:
My XML looks like: <abc> <def type="apple"> 1 </def> <def type="peach"> 2 </def> <def type="orange"> 3 </def> <def type="banana"> 4 </def> <def type="plum"> 5 </def> </abc>
1
2615
by: discomiller | last post by:
Mario Mueller: Hello *, radiobuttons belong to other radiobuttons by the "name="any_value"" attribut. Thats a fakt. I got the following XML:...
21
11335
by: TheKeith | last post by:
I heard that the name attribute is deprecated in html 4.01 strict. Is it recommended that you use the ID attribute for images along with the getElementById method instead of the old way? Thanks.
3
3197
by: bli | last post by:
hi all first post. I am using python to connect to dll. I have read everything I can find on com!#@! and tried all variations of the name of the dll to use in the Dispatch. I get a com...
0
1736
by: Kai Rosenthal | last post by:
Hello, I' having a problem with gencache.EnsureModule: I used win32com\client\makepy.py to successfully generate Python sources. Unfortunately, after I call win32com.client.Dispatch(), the...
0
7018
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...
0
7182
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,...
0
7397
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...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4611
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...
0
3110
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...
0
1430
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 ...
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
316
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...

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.