Browse Source

inital commit

pull/1/head
greenday 5 years ago
commit
c3bfc8f8fb
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      chat.py

+ 15
- 0
chat.py View File

@@ -0,0 +1,15 @@
import network
import sys

def heard(phrase):
print('them:' + phrase)

if (len(sys.argv) >= 2):
network.call(sys.argv[1], whenHearCall=heard)
else:
network.wait(whenHearCall=heard)

while network.isConnected():
phrase = input()
print('me:' + phrase)
network.say(phrase)

Loading…
Cancel
Save