mirror of
https://github.com/kennethreitz-archive/bpython-gist.git
synced 2026-06-05 15:40:17 +00:00
"flush_output" option added to config
controls whether output will be flushed to stdout or not.
This commit is contained in:
@@ -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
|
||||
|
||||
+3
-1
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user