Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from ericsomdahl/master
Browse files Browse the repository at this point in the history
Support for python 2
  • Loading branch information
slazarov authored Nov 29, 2017
2 parents 2eef503 + 6c8982d commit 22fee1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bittrex_websocket/order_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
# bittrex_websocket/order_book.py
# Stanislav Lazarov

import queue
try:
import queue as queue
except ImportError:
import Queue as queue

from copy import deepcopy
from threading import Thread
from time import sleep, time
Expand Down Expand Up @@ -86,7 +90,7 @@ def _retrieve(q, result):
q.task_done()

print('Retrieving order book snapshot...')
for j in range(num_threads):
for j in list(range(num_threads)):
worker = Thread(target=_retrieve, args=(order_queue, order_books))
worker.setDaemon(True)
worker.start()
Expand Down
2 changes: 1 addition & 1 deletion bittrex_websocket/summary_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ def on_message(self, *args, **kwargs):
tickers = ['BTC-ETH', 'ETH-1ST', 'BTC-1ST', 'BTC-NEO', 'ETH-NEO']
ws = MyBittrexSocket(tickers)
ws.run()
for i in range(10):
for i in list(range(10)):
sleep(1)
ws.stop()
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
'Intended Audience :: Information Technology',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
Expand Down

0 comments on commit 22fee1e

Please sign in to comment.