Sha256: a6da29e295506c2b7b1cc1f7547cc2a1c94db8476aa3c931a7f04e115f9531f3
Contents?: true
Size: 540 Bytes
Versions: 23
Compression:
Stored size: 540 Bytes
Contents
#!/usr/bin/env ruby require 'tempfile' require 'readline' include Readline $:.unshift '.', '..', 'lib', File.join('..','lib') require 'session' idl = Session::IDL.new n = 0 loop do command = readline("#{ n }: IDL_WRAP > ", true) if command =~ /^\s*\!*history\!*\s*$/ open('idl_wrap.history','w'){|f| f.puts idl.history} next end exit if command =~ /^\s*exit\s*$/io out, err = idl.execute command out ||= '' err ||= '' printf "STDOUT:\n%s\nSTDERR:\n%s\n", out.gsub(%r/^/,"\t"), err.gsub(%r/^/,"\t") n += 1 end
Version data entries
23 entries across 23 versions & 2 rubygems