win32com, generating the cache programaticaly?

A

Andrew Markebo

Hello!

I am messing around with communicating between LabVIEW and Python, got
it to work by a small 'fix' (grabbing the generated file, and
importing it by hand)

What I might want to do, is to automatically generate the data done by
executing makepy.py and run by it.

What I select in makepy.py is a library "LabVIEW data 7.1", I would
like to do this from my program. Any hints?

Then, is it possible making this on a minor mode, basically I have
only to dig out the CLSID of "LabVIEW data 7.1" and put it into the
generated file.. sort of??

/Andy

--
"I do not agree with what you say, but I will defend to the death
your right to say it."

-- Francois Marie Arouet Voltaire (1694-1778), French philosopher,
writer, "Candide"
 
R

Roger Upole

Andrew Markebo said:
Hello!

I am messing around with communicating between LabVIEW and Python, got
it to work by a small 'fix' (grabbing the generated file, and
importing it by hand)

What I might want to do, is to automatically generate the data done by
executing makepy.py and run by it.

What I select in makepy.py is a library "LabVIEW data 7.1", I would
like to do this from my program. Any hints?

Then, is it possible making this on a minor mode, basically I have
only to dig out the CLSID of "LabVIEW data 7.1" and put it into the
generated file.. sort of??

You can use win32com.client.gencache.EnsureDispatch
to automatically generate the makepy file for an object's library
when the object is created. Use the bForDemand option to
only generate the code for objects as needed.

Roger
 
A

Andrew Markebo

| You can use win32com.client.gencache.EnsureDispatch
| to automatically generate the makepy file for an object's library
| when the object is created. Use the bForDemand option to
| only generate the code for objects as needed.

Drats, I get an:

raise TypeError, "This COM object can not automate the makepy process
- please run makepy manually for this object"

Thanx anyway!

/Andy
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top