diff --git a/IPython/Logger.py b/IPython/Logger.py index 6f4880d..0d1788c 100644 --- a/IPython/Logger.py +++ b/IPython/Logger.py @@ -2,7 +2,7 @@ """ Logger class for IPython's logging facilities. -$Id: Logger.py 2653 2007-08-22 18:01:09Z vivainio $ +$Id: Logger.py 2874 2007-11-26 06:50:42Z fperez $ """ #***************************************************************************** @@ -255,7 +255,17 @@ which already exists. But you must first start the logging process with write('%s\n' % odata) self.logfile.flush() - def close_log(self): + def logstop(self): + """Fully stop logging and close log file. + + In order to start logging again, a new logstart() call needs to be + made, possibly (though not necessarily) with a new filename, mode and + other options.""" + self.logfile.close() self.logfile = None self.logfname = '' + self.log_active = False + + # For backwards compatibility, in case anyone was using this. + close_log = logstop diff --git a/IPython/Magic.py b/IPython/Magic.py index ad0d875..44daebe 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Magic functions for InteractiveShell. -$Id: Magic.py 2872 2007-11-25 17:58:05Z fperez $""" +$Id: Magic.py 2874 2007-11-26 06:50:42Z fperez $""" #***************************************************************************** # Copyright (C) 2001 Janko Hauser and @@ -1147,6 +1147,14 @@ Currently the magic system has the following functions:\n""" 'Current session state plus future input saved.') logger.logstate() + def magic_logstop(self,parameter_s=''): + """Fully stop logging and close log file. + + In order to start logging again, a new %logstart call needs to be made, + possibly (though not necessarily) with a new filename, mode and other + options.""" + self.logger.logstop() + def magic_logoff(self,parameter_s=''): """Temporarily stop logging. diff --git a/IPython/UserConfig/ipy_user_conf.py b/IPython/UserConfig/ipy_user_conf.py index 5146557..f5054a3 100644 --- a/IPython/UserConfig/ipy_user_conf.py +++ b/IPython/UserConfig/ipy_user_conf.py @@ -62,6 +62,13 @@ def main(): #import_all("os sys") #execf('~/_ipython/ns.py') + # A different, more compact set of prompts from the default ones, that + # always show your current location in the filesystem: + + #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>' + #o.prompt_in2 = r'.\D: ' + #o.prompt_out = r'[\#] ' + # some config helper functions you can use def import_all(modules): """ Usage: import_all("os sys") """ diff --git a/doc/ChangeLog b/doc/ChangeLog index 91e1752..5cd8f9f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2007-11-25 Fernando Perez + + * IPython/Logger.py (Logger.logstop): add a proper logstop() + method to fully stop the logger, along with a corresponding + %logstop magic for interactive use. + + * IPython/Extensions/ipy_host_completers.py: added new host + completers functionality, contributed by Gael Pasgrimaud + . + 2007-11-24 Fernando Perez * IPython/DPyGetOpt.py (ArgumentError): Apply patch by Paul Mueller @@ -10,9 +20,9 @@ readline_omit__names setting. 2007-11-08 Ville Vainio - * ipy_completers.py (import completer): assume 'xml' module exists. + * ipy_completers.py (import completer): assume 'xml' module exists. Do not add every module twice anymore. Closes #196. - + * ipy_completers.py, ipy_app_completers.py: Add proper apt-get completer that uses apt-cache to search for existing packages. diff --git a/tools/release b/tools/release index 207f4a0..4418f4d 100755 --- a/tools/release +++ b/tools/release @@ -47,9 +47,11 @@ cd $ipdir # that the resulting RPM is really built with the requested python version (so # things go to lib/python2.X/...) python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4 +python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5 -# Build egg -./eggsetup.py bdist_egg +# Build eggs +python2.4 ./eggsetup.py bdist_egg +python2.5 ./eggsetup.py bdist_egg # Call the windows build separately, so that the extra Windows scripts don't # get pulled into Unix builds (setup.py has code which checks for diff --git a/tools/testrel b/tools/testrel index a83b85e..4faac6d 100755 --- a/tools/testrel +++ b/tools/testrel @@ -11,19 +11,15 @@ cd ~/ipython/ipython ./setup.py sdist --formats=gztar -# Build rpm -#python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4 +# Build rpms +python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4 +python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5 # Build eggs -./eggsetup.py bdist_egg +python2.4 ./eggsetup.py bdist_egg +python2.5 ./eggsetup.py bdist_egg # Call the windows build separately, so that the extra Windows scripts don't # get pulled into Unix builds (setup.py has code which checks for # bdist_wininst) - -# For now, make the win32 installer with a hand-built 2.3.5 python, which is -# the only one that fixes a crash in the post-install phase. -#$HOME/tmp/local/bin/python2.3 setup.py bdist_wininst \ -# --install-script=ipython_win_post_install.py - ./setup.py bdist_wininst --install-script=ipython_win_post_install.py