From ef31ba3c8d4294fa5ba763fdde3165d6b0ccc1ee 2007-05-15 15:09:39 From: vivainio Date: 2007-05-15 15:09:39 Subject: [PATCH] do not require 'PATH' in %rehash/%rehashx. Closes \#155 --- diff --git a/IPython/Magic.py b/IPython/Magic.py index 201f247..638fcd1 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Magic functions for InteractiveShell. -$Id: Magic.py 2308 2007-05-07 08:25:14Z vivainio $""" +$Id: Magic.py 2344 2007-05-15 15:09:39Z vivainio $""" #***************************************************************************** # Copyright (C) 2001 Janko Hauser and @@ -2518,7 +2518,7 @@ Defaulting color scheme to 'NoColor'""" # typical Linux box involves several thousand entries, so efficiency # here is a top concern. - path = filter(os.path.isdir,os.environ['PATH'].split(os.pathsep)) + path = filter(os.path.isdir,os.environ.get('PATH','').split(os.pathsep)) alias_table = self.shell.alias_table for pdir in path: for ff in os.listdir(pdir): @@ -2552,7 +2552,7 @@ Defaulting color scheme to 'NoColor'""" del ip.db['rootmodules'] path = [os.path.abspath(os.path.expanduser(p)) for p in - os.environ['PATH'].split(os.pathsep)] + os.environ.get('PATH','').split(os.pathsep)] path = filter(os.path.isdir,path) alias_table = self.shell.alias_table diff --git a/IPython/iplib.py b/IPython/iplib.py index 319890f..fa611ec 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 2341 2007-05-15 14:44:30Z vivainio $ +$Id: iplib.py 2344 2007-05-15 15:09:39Z vivainio $ """ #***************************************************************************** @@ -1288,9 +1288,7 @@ want to merge them back into the new files.""" % locals() Currently it handles auto-indent only.""" #debugx('self.indent_current_nsp','pre_readline:') - print "prer",self.indent_current_nsp # dbg - print - + self.readline.insert_text(self.indent_current_str()) def init_readline(self): @@ -1809,7 +1807,6 @@ want to merge them back into the new files.""" % locals() #debugx('line') #debugx('self.indent_current_nsp') if self.autoindent: - print "ind level", self.indent_current_nsp #dbg if line: inisp = num_ini_spaces(line) if inisp < self.indent_current_nsp: diff --git a/doc/ChangeLog b/doc/ChangeLog index 0bc8c35..1cbe803 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,9 @@ 2007-05-15 Ville Vainio - * iplib.py, pycolorize.py, pycolor.1: Paul Mueller's patches that + * pycolorize.py, pycolor.1: Paul Mueller's patches that make pycolorize read input from stdin when run without arguments. + + * Magic.py: do not require 'PATH' in %rehash/%rehashx. Closes #155 2007-05-10 Fernando Perez