+import sys
+
from datetime import datetime
-from Queue import Queue
-from thread import get_ident, start_new_thread
from xively import XivelyAPIClient
from xively import Datastream
from xively import Datapoint
+if sys.version_info<(3,0,0):
+ from Queue import Queue
+ from thread import get_ident, start_new_thread
+else:
+ from queue import Queue
+ from _thread import get_ident, start_new_thread
class Logger:
# Constructor