Skip to content

Commit

Permalink
print, flush and include instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
davidszotten committed Jul 24, 2015
1 parent 3f5929b commit d56e55a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ Install
::

pip install git+https://github.com/davidszotten/rdb.git


Usage
-----

::

with open('/tmp/rdb.log', 'w') as out:
from rdb import Rdb; Rdb(out=out).set_trace()
4 changes: 2 additions & 2 deletions rdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def get_avail_port(self, host, port, search_limit=100, skew=+0):
raise Exception(NO_AVAILABLE_PORT.format(self=self))

def say(self, m):
# print(m, file=self.out)
pass
print(m, file=self.out)
self.out.flush()

def _close_session(self):
self.stdin, self.stdout = sys.stdin, sys.stdout = self._prev_handles
Expand Down

0 comments on commit d56e55a

Please sign in to comment.