# Import socket module
from socket import *    
from path import path
# Create a TCP server socket
#(AF_INET is used for IPv4 protocols)
#(SOCK_STREAM is used for TCP)
listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# Assign a port number
PORT = 8080
HOST = ''
# Bind the socket to server address and server port
listener.bind(HOST,PORT)
# Listen to at most 1 connection at a time
listener.listen(1)

# Server should be up and running and listening to the incoming connections
print 'Running on port '+PORT
while True:
	print 'Ready to serve...'
	
	# Set up a new connection from the client
	connection, addr = listener.accept()
	# If an exception occurs during the execution of try clause
	# the rest of the clause is skipped
	# If the exception type matches the word after except
	# the except clause is executed
	try:
		# Receives the request message from the client
        request = connection.recv(1024)
		# Extract the path of the requested object from the message
		# The path is the second part of HTTP header, identified by [1]
        path = request[1]
		# Because the extracted path of the HTTP request includes 
		# a character '\', we read the path from the second character 
        path = path[1,]
		# Store the entire content of the requested file in a temporary buffer
        f = path(path).bytes() #requires use of the path library
		# Send the HTTP response header line to the connection socket
        connection.send("HTTP/1.1 200 OK\r\n\r\n")
 
		# Send the content of the requested file to the connection socket
        connection.send(f)
		# Close the client connection socket
        connection.close()

	except IOError:
		# Send HTTP response message for file not found
        connection.send('HTTP/1.1 404 Not Found\r\n\r\n')
		# Close the client connection socket
        connection.close()
# Close the Server connection socket
listener.close()
@@ -40,35 +40,9 @@
 rt *
-    %0Afrom path import path
 %0A
+
 # Cr
@@ -914,24 +914,18 @@
  client%0A
-        
+%09%09
 request 
@@ -1076,24 +1076,18 @@
  by %5B1%5D%0A
-        
+%09%09
 path = r
@@ -1222,24 +1222,18 @@
 racter %0A
-        
+%09%09
 path = p
@@ -1317,72 +1317,45 @@
 fer%0A
-        f = path(path).bytes() #requires use of the path library
+%09%09f = open(path, %22r%22)%0A%09%09c = f.read();
 %0A%09%09#
@@ -1411,32 +1411,26 @@
 tion socket%0A
-        
+%09%09
 connection.s
@@ -1526,32 +1526,26 @@
 tion socket%0A
-        
+%09%09
 connection.s
@@ -1548,17 +1548,17 @@
 on.send(
-f
+c
 )%0A%09%09# Cl
@@ -1586,32 +1586,26 @@
 tion socket%0A
-        
+%09%09
 connection.c
@@ -1679,24 +1679,18 @@
 t found%0A
-        
+%09%09
 connecti
@@ -1774,16 +1774,10 @@
 ket%0A
-        
+%09%09
 conn

remove use of path