summaryrefslogtreecommitdiff
path: root/demo3/utils.py
blob: 67e066fab92a2e16829b7f8a490f610b29c95349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Python modules
import sys


QUEUE_NAME = "/my_message_queue"


PY_MAJOR_VERSION = sys.version_info[0]

def get_input():
    """Get input from user, Python 2.x and 3.x compatible"""
    if PY_MAJOR_VERSION > 2:
        return input()
    else:
        return raw_input()