##// END OF EJS Templates
fix crash with missing profiles
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 1339 2006-05-31 16:13:50Z fperez $
9 $Id: iplib.py 1347 2006-06-04 00:42:44Z fperez $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -450,10 +450,9 b' class InteractiveShell(object,Magic):'
450 450 header='IPython system call: ',
451 451 verbose=self.rc.system_verbose)
452 452 self.getoutputerror = lambda cmd: \
453 getoutputerror(str(ItplNS(cmd.replace('#','\#'),
454 self.user_ns)),
455 header='IPython system call: ',
456 verbose=self.rc.system_verbose)
453 getoutputerror((self.var_expand(cmd),
454 header='IPython system call: ',
455 verbose=self.rc.system_verbose)
457 456
458 457 # RegExp for splitting line contents into pre-char//first
459 458 # word-method//rest. For clarity, each group in on one line.
@@ -1549,8 +1548,7 b' want to merge them back into the new files.""" % locals()'
1549 1548 self.showtraceback((etype,value,tb),tb_offset=0)
1550 1549
1551 1550 def transform_alias(self, alias,rest=''):
1552 """ Transform alias to system command string
1553
1551 """ Transform alias to system command string.
1554 1552 """
1555 1553 nargs,cmd = self.alias_table[alias]
1556 1554 if ' ' in cmd and os.path.isfile(cmd):
@@ -1572,7 +1570,7 b' want to merge them back into the new files.""" % locals()'
1572 1570 return None
1573 1571 cmd = '%s %s' % (cmd % tuple(args[:nargs]),' '.join(args[nargs:]))
1574 1572 # Now call the macro, evaluating in the user's namespace
1575
1573 #print 'new command: <%r>' % cmd # dbg
1576 1574 return cmd
1577 1575
1578 1576 def call_alias(self,alias,rest=''):
@@ -2034,6 +2032,7 b' want to merge them back into the new files.""" % locals()'
2034 2032 transformed = self.transform_alias(iFun, theRest)
2035 2033 line_out = '%s_ip.system(%s)' % (pre, make_quoted_expr( transformed ))
2036 2034 self.log(line,line_out,continue_prompt)
2035 #print 'line out:',line_out # dbg
2037 2036 return line_out
2038 2037
2039 2038 def handle_shell_escape(self, line, continue_prompt=None,
@@ -6,7 +6,7 b' Requires Python 2.1 or better.'
6 6
7 7 This file contains the main make_IPython() starter function.
8 8
9 $Id: ipmaker.py 1346 2006-06-03 23:55:15Z fperez $"""
9 $Id: ipmaker.py 1347 2006-06-04 00:42:44Z fperez $"""
10 10
11 11 #*****************************************************************************
12 12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -621,10 +621,9 b" object? -> Details about 'object'. ?object also works, ?? prints more."
621 621 except ImportError:
622 622 # only warn if ipythonrc-PROFNAME didn't exist
623 623 if opts.profile =='':
624 warn("Could not start with profile '%s'!\n ('%s/%s.py' does not exist? run '%%upgrade')" % (
625 opts_all.profile, ipythondir, profmodname)
626
627 )
624 warn("Could not start with profile '%s'!\n"
625 "('%s/%s.py' does not exist? run '%%upgrade')" %
626 (opts_all.profile, opts_all.ipythondir, profmodname) )
628 627 except:
629 628 print "Error importing",profmodname
630 629 IP.InteractiveTB()
General Comments 0
You need to be logged in to leave comments. Login now