gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libextractor-python] 02/02: Start making the python bindin


From: gnunet
Subject: [GNUnet-SVN] [libextractor-python] 02/02: Start making the python bindings py2 and py3 compatible.
Date: Fri, 01 Dec 2017 14:43:07 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository libextractor-python.

commit 62d0aab26d8473e3da389282e59ff4c1d39578d6
Author: ng0 <address@hidden>
AuthorDate: Fri Dec 1 13:42:35 2017 +0000

    Start making the python bindings py2 and py3 compatible.
---
 extract.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/extract.py b/extract.py
index d9b3b86..2521d07 100644
--- a/extract.py
+++ b/extract.py
@@ -3,6 +3,7 @@
 
      This file is part of libextractor.
      (C) 2002, 2003, 2004, 2005 Vidyut Samanta and Christian Grothoff
+     (C) 2017 ng0 <address@hidden>
 
      libextractor is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -22,6 +23,7 @@
 Little demo how to use the libextractor Python binding.
 
 """
+from __future__ import print_function
 import extractor
 import sys
 from ctypes import *
@@ -35,11 +37,11 @@ def print_k(xt, plugin, type, format, mime, data, datalen):
 # (in general, depending on the mime type and format, only
 # the first 'datalen' bytes in 'data' should be used).
     if (format == extractor.EXTRACTOR_METAFORMAT_UTF8):
-        print "%s - %s" % (xtract.keywordTypes()[type],  mstr.value)
+        print("%s - %s" % (xtract.keywordTypes()[type],  mstr.value))
     return 0
 
 
 for arg in sys.argv[1:]:
-    print "Keywords from %s:" % arg
+    print("Keywords from %s:" % arg)
     xtract.extract(print_k, None, arg)
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]