import sys


def error(message, exit=True):
    """Print an error message and optionally exit."""

    assert isinstance(message, str), "message must be a str"
    assert isinstance(exit, bool), "exit must be a bool"

    print "error:", message
    if exit:
        sys.exit(2)


def info(message):
    """Print a simple info message"""

    print message

@@ -1,8 +1,47 @@
+from __future__ import print_function%0A%0A
 import s
@@ -259,17 +259,17 @@
    print
- 
+(
 %22error:%22
@@ -277,16 +277,34 @@
  message
+, file=sys.stderr)
 %0A    if 
@@ -330,9 +330,9 @@
 xit(
-2
+1
 )%0A%0A%0A
@@ -398,17 +398,18 @@
    print
- 
+(
 message
+)
 %0A

Refactor error printing