from pointwise import GlyphClient, GlyphError # Initialize the client glf = GlyphClient() # Attempt the connection and execute commands if glf.connect(): try: # Evaluate any raw Tcl/Glyph command via the server version = glf.eval('pw::Application getVersion') print(f"Pointwise version is: {version}") except GlyphError as e: print(f"Command error: {e.command}\n{e.message}") else: if glf.is_busy(): print("Glyph Server is busy") if glf.auth_failed(): print("Authentication failed") else: print("Failed to connect to the Glyph Server") glf.close()