diff --git a/CHANGELOG b/CHANGELOG index 07349e8..042f406 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ Menno sent me some patches to fix some stuff: 'self' in arg list is now highlighted a different colour. +flush_output option added to config to control whether output is flushed to +stdout or not on exit. + v0.7.1 ====== Added support for a history file, defaults to ~/.pythonhist and 100 lines but diff --git a/bpython/cli.py b/bpython/cli.py index d55295f..5ef803b 100644 --- a/bpython/cli.py +++ b/bpython/cli.py @@ -110,6 +110,7 @@ OPTS.syntax = True OPTS.arg_spec = True OPTS.hist_file = '~/.pythonhist' OPTS.hist_length = 100 +OPTS.flush_output = True # TODO: # @@ -1733,7 +1734,8 @@ def main(): sys.exit(1) # Fake stdout data so everything's still visible after exiting - sys.stdout.write(o) + if OPTS.flush_output: + sys.stdout.write(o) sys.stdout.flush() if __name__ == '__main__':