Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/tcf/shell.py')
-rw-r--r--python/src/tcf/shell.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/src/tcf/shell.py b/python/src/tcf/shell.py
index 8d2b5ae28..dacd3d3fe 100644
--- a/python/src/tcf/shell.py
+++ b/python/src/tcf/shell.py
@@ -33,10 +33,16 @@ import tcf
from tcf.util import sync, event
from tcf import protocol, channel
+class print_peers:
+ def __repr__(self):
+ peers = tcf.peers()
+ return '\n'.join(peers.keys())
+
class Shell(code.InteractiveConsole, protocol.ChannelOpenListener, channel.ChannelListener):
def __init__(self):
locals = {
- "connect" : tcf.connect
+ "connect" : tcf.connect,
+ "peers" : print_peers()
}
sys.ps1 = "tcf> "
protocol.startEventQueue()

Back to the top