FAQ
Hi,

I'm having some problems using makepy and win32com to talk to LabVIEW
with python. I have a number of methods in LabVIEW that require "By
Ref" variable types and therefore I need to use the early binding
provided from makepy. So I run makpy on the LabVIEW server and it
generates the code correctly. However, whenever I try to initiate a
session (using win32com.client.Dispatch), it doesn't seem to enable
early binding. Forcing early binding from gencache.EnsureModule
generates a 'Library not registered' error. In addition, when I run
'makepy -i' I get the following output:
Warning - could not load registered typelib
'{9A872073-0A06-11D1-90B7-00A024CE2744}'
LabVIEW 6.1 Type Library
{9A872073-0A06-11D1-90B7-00A024CE2744}, lcid=0, major=5, minor=2
# Use these commands in Python code to auto generate .py support
from win32com.client import gencache
gencache.EnsureModule('{9A872073-0A06-11D1-90B7-00A024CE2744}',
0, 5, 2)

I believe the Warning in the first line above is at the root of the
problem.

I can work around this problem - if I rename the file
9A872073-0A06-11D1-90B7-00A024CE2744x0x5x2.py generated from makepy to
labview.py and then load this file directly. i.e.:

import labview
test=labview.Application()

Then the early-binding works and everything is fine. I can live with
this solution but I'd be happier knowing what the problem is.

Thanks,
Mark

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 30, '03 at 2:53p
activeApr 30, '03 at 2:53p
posts1
users1
websitepython.org

1 user in discussion

Mark Lumsden: 1 post

People

Translate

site design / logo © 2022 Grokbase