transformer11.py 472 B

123456789101112131415161718
  1. import win32com.client
  2. from pathlib import Path
  3. class transformer11:
  4. def __init__(self):
  5. self.tr = win32com.client.Dispatch("IBMCognosTransformer.ApplicationCtrl.1")
  6. print(self.tr.Version)
  7. self.tr.Visible = True
  8. def open(self, file, format = None):
  9. filename = Path(file).resolve()
  10. print(filename)
  11. self.tr.OpenModel(filename)
  12. if __name__ == "__main__":
  13. transformer11().open("Transformer11\\V_Verkauf.pyj")