Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update server.py #288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def do_GET(self):
thread = threading.Thread(target = server.serve_forever)
thread.daemon = True
thread.start()
print 'HTTP server started on port 8080'
print ('HTTP server started on port 8080')
while True:
from time import sleep
sleep(1)
Expand Down Expand Up @@ -280,7 +280,7 @@ def handle_query(self, x):
t1, bids1, asks1 = self._current_book_1.next()
t2, bids2, asks2 = self._current_book_2.next()
t = t1 if t1 > t2 else t2
print 'Query received @ t%s' % t
print ('Query received @ t%s') % t
return [{
'id': x and x.get('id', None),
'stock': 'ABC',
Expand Down Expand Up @@ -314,6 +314,6 @@ def handle_query(self, x):

if __name__ == '__main__':
if not os.path.isfile('test.csv'):
print "No data found, generating..."
print ("No data found, generating...")
generate_csv()
run(App())