Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: Andyfritter/SomethingChat
base: 40473756d5
...
head fork: Andyfritter/SomethingChat
compare: e4f19c3cef
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 20, 2012
@Andyfritter ADDED SOME SHIT e4f19c3
Showing with 8 additions and 4 deletions.
  1. +8 −4 client.py
View
12 client.py
@@ -4,12 +4,16 @@
class Client():
def __init__(self):
self.name = raw_input('Enter Name: ')
- self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.s.connect((HOST, PORT))
- data = s.recv(1024)
- self.s.close()
+ try: self.host = HOST
+ except: self.host = raw_input('Enter Host\'s IP: ')
+ self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.s.connect((self.host, PORT))
+ data = s.recv(1024)
+ self.s.close()
print repr(data)
def say(self, msg):
self.s.sendall(self.name + ': ' + msg)
+
+

No commit comments for this range

Something went wrong with that request. Please try again.