Python Universal Library bug fix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #1

    Python Universal Library bug fix

    With the current release of Measurement Computings Universal Library, the UniversalLibrar y.py module is broken. Here is the fix:
    Code:
    def cbGetStatus(BoardNum, Status, CurCount,
    				CurIndex, FunctionType):
    	"""Returns status about potentially currently running background operation"""
    	Status = ctypes.c_short(Status)
    	CurCount = ctypes.c_long(CurCount)
    	CurIndex = ctypes.c_long(CurIndex)
    ## Legacy call doesn't work with current cbw32.dll
    ##	CHK( cbw.cbGetStatus(BoardNum, byref(Status), byref(CurCount),
    ##						 byref(CurIndex), FunctionType))
    	CHK( cbw.cbGetIOStatus(BoardNum, byref(Status), byref(CurCount),
    						 byref(CurIndex), FunctionType))
    	return Status.value, CurCount.value, CurIndex.value
Working...