##// END OF EJS Templates
better message on script magic not found...
MinRK -
Show More
@@ -12,6 +12,7 b''
12 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
13
13
14 # Stdlib
14 # Stdlib
15 import errno
15 import os
16 import os
16 import re
17 import re
17 import sys
18 import sys
@@ -184,8 +185,15 b' class ScriptMagics(Magics, Configurable):'
184 """
185 """
185 argv = arg_split(line, posix = not sys.platform.startswith('win'))
186 argv = arg_split(line, posix = not sys.platform.startswith('win'))
186 args, cmd = self.shebang.parser.parse_known_args(argv)
187 args, cmd = self.shebang.parser.parse_known_args(argv)
187
188
188 p = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
189 try:
190 p = Popen(cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
191 except OSError as e:
192 if e.errno == errno.ENOENT:
193 print "Couldn't find program: %r" % cmd[0]
194 return
195 else:
196 raise
189
197
190 cell = cell.encode('utf8', 'replace')
198 cell = cell.encode('utf8', 'replace')
191 if args.bg:
199 if args.bg:
General Comments 0
You need to be logged in to leave comments. Login now