View Single Post
  #1  
Old 05-15-2019, 02: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 08:39 AM. Reason: Use code tags around code
Reply With Quote