From 45da9ec01e11ea9586ff8a45e98ebfb20474eab2 Mon Sep 17 00:00:00 2001 From: moculus Date: Thu, 15 May 2008 15:05:08 +0000 Subject: [PATCH] foog --HG-- branch : pmacs2 --- mode/iperlmini.py | 3 ++- tools/iperl | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mode/iperlmini.py b/mode/iperlmini.py index 6ada584..d63a00a 100644 --- a/mode/iperlmini.py +++ b/mode/iperlmini.py @@ -121,7 +121,8 @@ class IperlMini(mode.Fundamental): self.hindex = 0 cmd = ('iperl', '-p') - self.pipe = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT) + f = open('/dev/null', 'w') + self.pipe = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=f) (type_, value) = self._readline() assert type_ == 'PROMPT', type_ w.application.set_mini_buffer_prompt('%s ' % value.strip()) diff --git a/tools/iperl b/tools/iperl index 654f53f..8a952db 100755 --- a/tools/iperl +++ b/tools/iperl @@ -257,12 +257,14 @@ sub main { $prompt = "..>"; } else { $input .= $line; - my @results = map { chomp($_); repr($_); } eval($input); + my @results = eval($input); if($@) { draw_error($@); } elsif(scalar(@results) < 2) { + @results = map { chomp($_); repr($_); } draw_result($results[0]); } else { + @results = map { chomp($_); repr($_); } draw_result(join(", ", @results)); } ($input, $prompt) = ("", ">>>");