From bc21f85adccd412a72e718eea7335480503a1980 Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 7 Mar 2019 09:05:51 +0100 Subject: [PATCH] Use print() function in both Python 2 and Python 3 Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3. --- facebook/facebook.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/facebook/facebook.py b/facebook/facebook.py index 0389818..4b05563 100644 --- a/facebook/facebook.py +++ b/facebook/facebook.py @@ -1,3 +1,5 @@ +from __future__ import print_function + import argparse import requests import pyquery @@ -49,6 +51,6 @@ if __name__ == "__main__": fb_dtsg, user_id, xs = login(session, args.email, args.password) if user_id: - print '{0}:{1}:{2}'.format(fb_dtsg, user_id, xs) + print('{0}:{1}:{2}'.format(fb_dtsg, user_id, xs)) else: - print 'Login Failed' \ No newline at end of file + print('Login Failed')