36 lines
969 B
Diff
36 lines
969 B
Diff
From 751da6367a57d6d7498f78e44ae7f978c013ab74 Mon Sep 17 00:00:00 2001
|
|
From: Parag A Nemade <pnemade@fedoraproject.org>
|
|
Date: Mon, 28 Nov 2016 13:47:30 +0530
|
|
Subject: [PATCH] Make inspect.py file compatible to run with python2 and
|
|
python3
|
|
|
|
Signed-off-by: Parag A Nemade <pnemade@fedoraproject.org>
|
|
---
|
|
Lib/fontTools/inspect.py | 10 ++++++++--
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/Lib/fontTools/inspect.py b/Lib/fontTools/inspect.py
|
|
index d48be9c..f1ada6c 100644
|
|
--- a/Lib/fontTools/inspect.py
|
|
+++ b/Lib/fontTools/inspect.py
|
|
@@ -8,8 +8,14 @@
|
|
from __future__ import print_function, division, absolute_import
|
|
from fontTools.misc.py23 import *
|
|
from fontTools import misc, ttLib, cffLib
|
|
-import pygtk
|
|
-pygtk.require('2.0')
|
|
+try:
|
|
+ from gi import pygtkcompat
|
|
+except ImportError:
|
|
+ pygtkcompat = None
|
|
+
|
|
+if pygtkcompat is not None:
|
|
+ pygtkcompat.enable()
|
|
+ pygtkcompat.enable_gtk(version='3.0')
|
|
import gtk
|
|
import sys
|
|
|
|
--
|
|
2.9.3
|
|
|