Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-28-2015, 04:08 PM
Miguel Miguel is offline
Registered User
Join Date: Oct 2015
Posts: 2
Question python using regular expression - import re - in mac, linux

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


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)
szResult = objTab.Screen.ReadString(szPrompt)

Best Regards
Reply With Quote

linux , mac , python

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 08:34 PM.