##// END OF EJS Templates
change term title on system commands
vivainio -
Show More
@@ -5,7 +5,7 b' General purpose utilities.'
5 5 This is a grab-bag of stuff I find useful in most programs I write. Some of
6 6 these things are also convenient when working at the command line.
7 7
8 $Id: genutils.py 2408 2007-05-28 16:29:50Z vivainio $"""
8 $Id: genutils.py 2439 2007-06-14 18:41:48Z vivainio $"""
9 9
10 10 #*****************************************************************************
11 11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -35,7 +35,7 b' import warnings'
35 35 # Other IPython utilities
36 36 import IPython
37 37 from IPython.Itpl import Itpl,itpl,printpl
38 from IPython import DPyGetOpt
38 from IPython import DPyGetOpt, platutils
39 39 from IPython.generics import result_display
40 40 from path import path
41 41 if os.name == "nt":
@@ -324,8 +324,11 b" def shell(cmd,verbose=0,debug=0,header=''):"
324 324 if verbose or debug: print header+cmd
325 325 # flush stdout so we don't mangle python's buffering
326 326 sys.stdout.flush()
327
327 328 if not debug:
329 platutils.set_term_title("IPy:" + cmd)
328 330 os.system(cmd)
331 platutils.set_term_title("IPy:" + os.path.basename(os.getcwd()))
329 332
330 333 # override shell() for win32 to deal with network shares
331 334 if os.name in ('nt','dos'):
@@ -170,4 +170,4 b' def init_ipython(ip):'
170 170 ip.expose_magic("hist",magic_hist)
171 171 ip.expose_magic("history",magic_history)
172 172
173 # test_shist()
173 #test_shist()
General Comments 0
You need to be logged in to leave comments. Login now