qdo (1940:6f54e570db58) qdo (1964:fca3bb8babaf)
1#! /usr/bin/env python
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 85 unchanged lines hidden (view full) ---

94 # full_output accumulates the full output of the session
95 self.full_output = ""
96 self.quick_timeout = 15
97 # wait for a prompt, then change it
98 try:
99 self.expect('\$ ', options.qsub_timeout)
100 except pexpect.TIMEOUT:
101 print >>sys.stderr, "%s: qsub timed out." % progname
1#! /usr/bin/env python
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 85 unchanged lines hidden (view full) ---

94 # full_output accumulates the full output of the session
95 self.full_output = ""
96 self.quick_timeout = 15
97 # wait for a prompt, then change it
98 try:
99 self.expect('\$ ', options.qsub_timeout)
100 except pexpect.TIMEOUT:
101 print >>sys.stderr, "%s: qsub timed out." % progname
102 self.kill(15)
102 self.kill(9)
103 self.close(wait=True)
104 sys.exit(1)
105 self.do_command('unset PROMPT_COMMAND; PS1="qdo$ "')
106
107 # version of expect that updates full_output too
108 def expect(self, regexp, timeout = -1):
109 pexpect.spawn.expect(self, regexp, timeout)
110 self.full_output += self.before + self.after

--- 109 unchanged lines hidden ---
103 self.close(wait=True)
104 sys.exit(1)
105 self.do_command('unset PROMPT_COMMAND; PS1="qdo$ "')
106
107 # version of expect that updates full_output too
108 def expect(self, regexp, timeout = -1):
109 pexpect.spawn.expect(self, regexp, timeout)
110 self.full_output += self.before + self.after

--- 109 unchanged lines hidden ---