Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-15-2019, 03:39 AM
somenasty somenasty is offline
Registered User
 
Join Date: May 2019
Posts: 1
loop failed to execute by python

Code:
# $language = "Python"
# $interface = "1.0"

# Connect to a telnet server and automate the initial login sequence.
# Note that synchronous mode is enabled to prevent server output from
# potentially being missed.

def main():

	crt.Screen.Synchronous = True

	# connect to host on port 23 (the default telnet port)
	#count = crt.Arguments
	count = 0
    while count<5 :
	  # crt.Screen.WaitForString("Enter password>")
	  # crt.Screen.Send("arristi\r")
	    crt.Screen.WaitForString("Console>")
	    crt.Screen.Send("sta\r")
        count = count +1
	crt.Screen.Synchronous = False


main()

Last edited by jdev; 05-15-2019 at 09:39 AM. Reason: Use code tags around code
Reply With Quote
 

Tags
python2.6


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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:13 AM.