def getTestOutput():
 sleep(1)
 for i in xrange(5):
  if ('ip_session.log' in nt.listdir(nt.getcwd())):
   tfile = open('ip_session.log', 'r')
   break
  print 'Waiting for ip_session.log to be created...'
  sleep(1)
 outlines = tfile.readlines()
 tfile.close()
 errlines = []
 if File.Exists('ip_session_stderr.log'):
  tfile = open('ip_session_stderr.log', 'r')
  errlines = tfile.readlines()
  tfile.close()
 return (outlines, errlines)

def getTestOutput ( ) : sleep ( 1 ) for i in xrange ( 5 ) : if ( 'ip_session.log' in nt . listdir ( nt . getcwd ( ) ) ) : tfile = open ( 'ip_session.log' , 'r' ) break print 'Waiting for ip_session.log to be created...' sleep ( 1 ) outlines = tfile . readlines ( ) tfile . close ( ) errlines = [ ] if File . Exists ( 'ip_session_stderr.log' ) : tfile = open ( 'ip_session_stderr.log' , 'r' ) errlines = tfile . readlines ( ) tfile . close ( ) return ( outlines , errlines )
returns stdout and stderr output for a console test .