#1
|
|||
|
|||
![]()
I`m trying to build a simple script, that execute command depending of previous outputs.
In order to accomplish this, i like to import and use RE - regular expression. When i try to import re, the script dont work and dont give any error in MAC. I also try in Linux and the script dont work. Its possible to import re to work inside the secure CRT in MAC ? example of the script: # $language = "python" # $interface = "1.0" # basic collect info # Miguel Valadares import*re szPrompt = 'Reload' objTab = crt.GetScriptTab() objTab.Screen.Synchronous = True objTab.Screen.IgnoreEscape = True objTab.Screen.Send( 'term len 0' + chr(13)) szCommand = 'show ver ' + chr(13) objTab.Screen.Send(szCommand) objTab.Screen.WaitForString(szCommand) szResult = objTab.Screen.ReadString(szPrompt) crt.Dialog.MessageBox(szResult) Best Regards Miguel |
Tags |
linux , mac , python |
Thread Tools | |
Display Modes | Rate This Thread |
|
|