From 34bfe975b68d7c99c5a4838813ef752bbd3017fb Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Mon, 23 Nov 2015 21:56:31 -0500 Subject: [PATCH] Use sys.stdout instead of print() for buffering reasons --- pwndbg/commands/context.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pwndbg/commands/context.py b/pwndbg/commands/context.py index 05d736bde..4a61e1e90 100644 --- a/pwndbg/commands/context.py +++ b/pwndbg/commands/context.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import gdb +import sys + import pwndbg.arguments import pwndbg.chain import pwndbg.color @@ -39,7 +41,8 @@ def context(*args): result.extend(context_signal()) for line in result: - print(line) + sys.stdout.write(line + '\n') + sys.stdout.flush() def context_regs(): result = []