|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
||||
|
||||
Error when running "Import Arbitrary Data From File to SecureCRT Sessions" script
I have recently upgraded to SecureCRT Version 9.0.1 (build 2451)
I am running it on macOS Catalina: 10.15.7 (19H524) and when trying to run the: "Import Arbitrary Data From File to SecureCRT Sessions" script from the Script Examples post; I get the following error: Code:
SyntaxError Error: invalid syntax File: /Volumes/GoogleDrive/My Drive/SecureCRT_Scripts/ImportArbitraryDataFromFileToSecureCRTSessions.py Line: 443 except Exception, objErr: Code:
def OpenPathInDefaultApp(strFile): strPlatform = sys.platform crt.Session.SetStatusText("Platform: {0}".format(strPlatform)) crt.Sleep(200) try: if sys.platform.startswith('darwin'): subprocess.call(('open', strFile)) elif strPlatform == "win32": os.startfile(strFile) elif sys.platform.startswith('linux'): subprocess.call(('xdg-open', strFile)) else: MsgBox("Unknown operating system: " + os.name) ##Line 443->>## except Exception, objErr: MsgBox( "Failed to open " + strFile + " with the default app.\n\n" + str(objErr).replace('\\\\', '\\').replace('u\'', '\'')) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|