From f3765db04b903b3671733e07cf1541a51966dd14 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Fri, 21 Feb 2014 04:46:49 +0000 Subject: Imported from /home/lorry/working-area/delta_python-packages_posix-ipc-tarball/posix_ipc-0.9.8.tar.gz. --- demo3/utils.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 demo3/utils.py (limited to 'demo3/utils.py') diff --git a/demo3/utils.py b/demo3/utils.py new file mode 100644 index 0000000..67e066f --- /dev/null +++ b/demo3/utils.py @@ -0,0 +1,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() -- cgit v1.2.1