import select import errno import fcntl import termios import platform import clewn.asyncproc as asyncproc import clewn.misc as misc try: MAXFD = os.sysconf("SC_OPEN_MAX") except ValueError: MAXFD = 256 # set the logging methods (critical, error, warning, info, debug) = misc.logmethods('psix') Unused = warning Unused = debug def platform_data(): """Return platform information.""" return 'platform: %s' % platform.platform() def close_fds(): """Close all file descriptors except stdin, stdout and stderr.""" for i in xrange(3, MAXFD): try: os.close(i) except OSError:
return endif endfor let l:bplist = join(a:000) call s:source_commands("command " . l:bplist, \ "Type commands for breakpoint(s) " . l:bplist . "") endfunction command! -bar -nargs=* ${pre}define call s:define(<f-args>) command! -bar -nargs=* ${pre}document call s:document(<f-args>) command! -bar -nargs=* ${pre}commands call s:commands(<f-args>) """ # set the logging methods (critical, error, warning, info, debug) = misc.logmethods('gdb') def unwrap_stream_record(lines): """Remove the stream record wrapper from each line. Return 'lines' unchanged, if one of them is not a stream record. """ unwrapped = [] for line in lines.splitlines(): if line: # ignore an ASYNC-RECORD if line[0] in '*+=': continue elif line.startswith('~"') and line.endswith(r'\n"'): line = line[2:-3]
import select import errno import fcntl import termios import platform import clewn.asyncproc as asyncproc import clewn.misc as misc try: MAXFD = os.sysconf("SC_OPEN_MAX") except ValueError: MAXFD = 256 # set the logging methods (critical, error, warning, info, debug) = misc.logmethods("psix") Unused = warning Unused = debug def platform_data(): """Return platform information.""" return "platform: %s" % platform.platform() def close_fds(): """Close all file descriptors except stdin, stdout and stderr.""" for i in xrange(3, MAXFD): try: os.close(i) except OSError: