From 8a117c17ec903ce01ea147d4bef7fcc6ff161baa Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Tue, 20 Jan 2015 00:15:31 +0100 Subject: Make it run under Python 3 --- AndroidResR/AndroidResR.py | 4 ++-- AndroidResR/util/ConfigLoader.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'AndroidResR') diff --git a/AndroidResR/AndroidResR.py b/AndroidResR/AndroidResR.py index 41e6c4f..0de0391 100755 --- a/AndroidResR/AndroidResR.py +++ b/AndroidResR/AndroidResR.py @@ -11,7 +11,7 @@ from util.ConfigLoader import ConfigLoader __author__ = 'Victor Häggqvist' -__version__ = '1.1.0' +__version__ = '1.1.1' DRAWABLEDIRS = ["drawable-mdpi", "drawable-hdpi", "drawable-xhdpi", "drawable-xxhdpi", "drawable-xxxhdpi"] DRAWABLESHORT = ["mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"] @@ -20,7 +20,7 @@ DEBUG = True def log(msg): if DEBUG: - print msg + print(msg) class Window(QtGui.QMainWindow, Ui_MainWindow): diff --git a/AndroidResR/util/ConfigLoader.py b/AndroidResR/util/ConfigLoader.py index b12771f..6da08d3 100644 --- a/AndroidResR/util/ConfigLoader.py +++ b/AndroidResR/util/ConfigLoader.py @@ -1,4 +1,4 @@ -import ConfigParser +import configparser from os.path import expanduser, join, isfile __author__ = 'victor' @@ -11,7 +11,7 @@ class ConfigLoader(): def __init__(self): self.userHome = expanduser("~") self.CONFIG_FILE = join(self.userHome, '.androidresr') - self.config = ConfigParser.RawConfigParser(allow_no_value=True) + self.config = configparser.RawConfigParser(allow_no_value=True) if not isfile(self.CONFIG_FILE): self.initFile() @@ -30,7 +30,7 @@ class ConfigLoader(): def get(self, key): try: return self.config.get("general", key) - except ConfigParser.NoOptionError: + except configparser.NoOptionError: return None def initFile(self): -- cgit v1.2.3