Flush stdout before reading next command.  Closes SF bug 526357.
diff --git a/Lib/cmd.py b/Lib/cmd.py
index 2a7be43..5f955a7 100644
--- a/Lib/cmd.py
+++ b/Lib/cmd.py
@@ -94,6 +94,7 @@
                         line = 'EOF'
                 else:
                     sys.stdout.write(self.prompt)
+                    sys.stdout.flush()
                     line = sys.stdin.readline()
                     if not len(line):
                         line = 'EOF'