I\'ve been trying to output as \'\\U0001f604\' instead of the smiley but it doesn\'t seem to work.
i tried
>>> print u'\U0001f604'.encode('unicode-escape') \U0001f604