Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 02-24-2020, 09:02 PM
MiniMe MiniMe is offline
Registered User
Join Date: Oct 2017
Posts: 10
What is the recommended way to create a Python like console for a SecureCRT script?

Is there a way to log to a Python like console messages that your SecureCRT Python script might want to sent to the user ?
(ex processed outputs from commands that were just sent)
Reply With Quote
Old 02-25-2020, 08:17 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,395
Hi MiniMe,

The only way I know presently would be to use crt.Dialog.MessageBox().

Or you can use Send() with the option that displays it to the screen only and does not send it to the remote.

Changes in SecureCRT 7.2 (Beta 1) -- October 8, 2013
New features:
  • The script function Screen.Send() can be used to send text to the screen only by using a new optional parameter.

I have added this thread to a feature request in our product enhancement database for an interactive Python console. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include Feature Request - Forum Thread #14090 in the subject line or use this form from the support page of our website.

VanDyke Software
Technical Support
(505) 332-5730

Last edited by bgagnon; 02-25-2020 at 08:22 AM. Reason: additional info
Reply With Quote
Old 02-25-2020, 08:47 AM
MiniMe MiniMe is offline
Registered User
Join Date: Oct 2017
Posts: 10
Well I guess one way to do it is to log to a file and then use some sort of tail to monitor the file

Send is not going to work for a multi line output and if you want the things to stay indented and look nice
Reply With Quote
Old 03-13-2020, 10:06 AM
ngrison ngrison is offline
Registered User
Join Date: Aug 2017
Posts: 22
A true Python console would be ideal but until then one option is to use the command window to display text console-like. Just append to it with:

crt.CommandWindow.Text = crt.CommandWindow.Text + NewText

I have configured my own loggers to automatically do this and in terms of output it's very close to a true console. The only issue is that it's not necessarily enabled by the user. If it's off you can make sure it's visible with:

crt.CommandWindow.Visible = True
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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 07:14 AM.