I am trying to open a JMP file using python.
Here is the code I found online:
# -*- coding: cp1252 -*-
from win32com.client import Dispatch
jmp = Dispatch("JMP.Application")
doc = jmp.OpenDocument("C:/Users/bdourass/Desktop/Python/example.jmp")
doc.CreateOneWay

This is the error I get:

Traceback (most recent call last):
  File "C:\Users\bdourass\Desktop\Python\RunJMPusingPython.py", line 3, in
<module>
    jmp = Dispatch("JMP.Application")
  File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line
95, in Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line
108, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85,
in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
>>>

I couldn't find much resources about the interaction between python and JMP
pro software online
All inputs are appreciated. Thanks in advance.
Sam
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to