def localhost_commands(): print "Running localhost_commands..." TelnetSession.do('localhost','pwd').addCallback(answer,'pwd') TelnetSession.do('localhost','whoami').addCallback(answer,'whoami') from getpass import getpass from twisted.internet import reactor from tops.core.network.telnet import prepareTelnetSession
def show_status(): TelnetSession.do('TCC','axis status all')
def show_users(): TelnetSession.do('VMS','show users').addCallback(got_users)
def ftp_commands(): print "Running ftp_commands..." TelnetSession.do('FTP','debug').addCallback(answer,'debug toggle 1') TelnetSession.do('FTP','help set').addCallback(answer,'help set') TelnetSession.do('FTP','debug').addCallback(answer,'debug toggle 2')