##// END OF EJS Templates
- Add %logstop functionality to fully stop logger after turning it on....
fperez -
Show More
@@ -2,7 +2,7 b''
2 2 """
3 3 Logger class for IPython's logging facilities.
4 4
5 $Id: Logger.py 2653 2007-08-22 18:01:09Z vivainio $
5 $Id: Logger.py 2874 2007-11-26 06:50:42Z fperez $
6 6 """
7 7
8 8 #*****************************************************************************
@@ -255,7 +255,17 b' which already exists. But you must first start the logging process with'
255 255 write('%s\n' % odata)
256 256 self.logfile.flush()
257 257
258 def close_log(self):
258 def logstop(self):
259 """Fully stop logging and close log file.
260
261 In order to start logging again, a new logstart() call needs to be
262 made, possibly (though not necessarily) with a new filename, mode and
263 other options."""
264
259 265 self.logfile.close()
260 266 self.logfile = None
261 267 self.logfname = ''
268 self.log_active = False
269
270 # For backwards compatibility, in case anyone was using this.
271 close_log = logstop
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Magic functions for InteractiveShell.
3 3
4 $Id: Magic.py 2872 2007-11-25 17:58:05Z fperez $"""
4 $Id: Magic.py 2874 2007-11-26 06:50:42Z fperez $"""
5 5
6 6 #*****************************************************************************
7 7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -1147,6 +1147,14 b' Currently the magic system has the following functions:\\n"""'
1147 1147 'Current session state plus future input saved.')
1148 1148 logger.logstate()
1149 1149
1150 def magic_logstop(self,parameter_s=''):
1151 """Fully stop logging and close log file.
1152
1153 In order to start logging again, a new %logstart call needs to be made,
1154 possibly (though not necessarily) with a new filename, mode and other
1155 options."""
1156 self.logger.logstop()
1157
1150 1158 def magic_logoff(self,parameter_s=''):
1151 1159 """Temporarily stop logging.
1152 1160
@@ -62,6 +62,13 b' def main():'
62 62 #import_all("os sys")
63 63 #execf('~/_ipython/ns.py')
64 64
65 # A different, more compact set of prompts from the default ones, that
66 # always show your current location in the filesystem:
67
68 #o.prompt_in1 = r'\C_LightBlue[\C_LightCyan\Y2\C_LightBlue]\C_Normal\n\C_Green|\#>'
69 #o.prompt_in2 = r'.\D: '
70 #o.prompt_out = r'[\#] '
71
65 72 # some config helper functions you can use
66 73 def import_all(modules):
67 74 """ Usage: import_all("os sys") """
@@ -1,3 +1,13 b''
1 2007-11-25 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/Logger.py (Logger.logstop): add a proper logstop()
4 method to fully stop the logger, along with a corresponding
5 %logstop magic for interactive use.
6
7 * IPython/Extensions/ipy_host_completers.py: added new host
8 completers functionality, contributed by Gael Pasgrimaud
9 <gawel-AT-afpy.org>.
10
1 11 2007-11-24 Fernando Perez <Fernando.Perez@colorado.edu>
2 12
3 13 * IPython/DPyGetOpt.py (ArgumentError): Apply patch by Paul Mueller
@@ -47,9 +47,11 b' cd $ipdir'
47 47 # that the resulting RPM is really built with the requested python version (so
48 48 # things go to lib/python2.X/...)
49 49 python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
50 python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
50 51
51 # Build egg
52 ./eggsetup.py bdist_egg
52 # Build eggs
53 python2.4 ./eggsetup.py bdist_egg
54 python2.5 ./eggsetup.py bdist_egg
53 55
54 56 # Call the windows build separately, so that the extra Windows scripts don't
55 57 # get pulled into Unix builds (setup.py has code which checks for
@@ -11,19 +11,15 b' cd ~/ipython/ipython'
11 11
12 12 ./setup.py sdist --formats=gztar
13 13
14 # Build rpm
15 #python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
14 # Build rpms
15 python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
16 python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
16 17
17 18 # Build eggs
18 ./eggsetup.py bdist_egg
19 python2.4 ./eggsetup.py bdist_egg
20 python2.5 ./eggsetup.py bdist_egg
19 21
20 22 # Call the windows build separately, so that the extra Windows scripts don't
21 23 # get pulled into Unix builds (setup.py has code which checks for
22 24 # bdist_wininst)
23
24 # For now, make the win32 installer with a hand-built 2.3.5 python, which is
25 # the only one that fixes a crash in the post-install phase.
26 #$HOME/tmp/local/bin/python2.3 setup.py bdist_wininst \
27 # --install-script=ipython_win_post_install.py
28
29 25 ./setup.py bdist_wininst --install-script=ipython_win_post_install.py
General Comments 0
You need to be logged in to leave comments. Login now