Index: src/mlx/config.py
===================================================================
--- src/mlx/config.py	(revision 897)
+++ src/mlx/config.py	(revision 919)
@@ -1,11 +1,11 @@
 # -*- encoding: utf-8 -*-
 
-import const
-from util import secondaryInstallation, utf2unicode
+from . import const
+from .util import secondaryInstallation, utf2unicode
 
 import os
 import sys
 import traceback
-import ConfigParser
+import configparser
 
 ## @package mlx.config
@@ -163,5 +163,5 @@
         baseName = "callouts." + const.icaoCodes[aircraftType] + "."
         index = 0
-        for (altitude, path) in self._mapping.iteritems():
+        for (altitude, path) in self._mapping.items():
             option = baseName + str(index)
             config.set(ApproachCallouts.SECTION, option,
@@ -171,9 +171,9 @@
     def getAltitudes(self, descending = True):
         """Get the altitudes in decreasing order by default."""
-        altitudes = self._mapping.keys()
+        altitudes = list(self._mapping.keys())
         altitudes.sort(reverse = descending)
         return altitudes
 
-    def __nonzero__(self):
+    def __bool__(self):
         """Return if there is anything in the mapping."""
         return not not self._mapping
@@ -674,4 +674,11 @@
         return self._useRPC
 
+    @useRPC.setter
+    def useRPC(self, useRPC):
+        """Set whether RPC calls should be used."""
+        if useRPC!=self._useRPC:
+            self._useRPC = useRPC
+            self._modified = True
+
     def getChecklist(self, aircraftType):
         """Get the checklist for the given aircraft type."""
@@ -697,5 +704,5 @@
         """Load the configuration from its default location."""
         try:
-            config = ConfigParser.RawConfigParser()
+            config = configparser.RawConfigParser()
             config.read(configPath)
         except:
@@ -781,4 +788,5 @@
                                     Config.DEFAULT_UPDATE_URL +
                                     ("/exp" if secondaryInstallation else ""))
+        self._useRPC = self._getBoolean(config, "general", "useRPC", True)
 
         for aircraftType in const.aircraftTypes:
@@ -798,5 +806,5 @@
             return
 
-        config = ConfigParser.RawConfigParser()
+        config = configparser.RawConfigParser()
 
         config.add_section("login")
@@ -873,4 +881,7 @@
         config.set("update", "url", self._updateURL)
 
+        config.set("general", "useRPC",
+                   "yes" if self._useRPC else "no")
+
         config.add_section(Checklist.SECTION)
         config.add_section(ApproachCallouts.SECTION)
@@ -881,15 +892,15 @@
         try:
             fd = os.open(configPath, os.O_CREAT|os.O_TRUNC|os.O_WRONLY,
-                         0600)
+                         0o600)
             with os.fdopen(fd, "wt") as f:
                 config.write(f)
             self._modified = False
 
-            print "Configuration saved:"
+            print("Configuration saved:")
             self.log()
 
-        except Exception, e:
-            print >> sys.stderr, "Failed to update config: " + \
-                                 utf2unicode(str(e))
+        except Exception as e:
+            print("Failed to update config: " + \
+                                 utf2unicode(str(e)), file=sys.stderr)
 
     def _getBoolean(self, config, section, option, default):
@@ -934,5 +945,5 @@
         import locale
         if self._language:
-            print "Setting up locale for", self._language
+            print("Setting up locale for", self._language)
             os.environ["LANGUAGE"] = self._language
             langAndEncoding = self._language + "." + locale.getpreferredencoding()
@@ -967,61 +978,62 @@
     def log(self):
         """Log the configuration by printing the values"""
-        print "  pilot ID:", self._pilotID
-        print "  rememberPassword:", self._rememberPassword
-
-        print "  language:", self._language
-
-        print "  hideMinimizedWindow:", self._hideMinimizedWindow
-        print "  quitOnClose:", self._quitOnClose
-
-        print "  onlineGateSystem:", self._onlineGateSystem
-        print "  onlineACARS:", self._onlineACARS
-
-        print "  flareTimeFromFS:", self._flareTimeFromFS
-        print "  syncFSTime:", self._syncFSTime
-        print "  usingFS2Crew:", self._usingFS2Crew
-
-        print "  iasSmoothingLength:", self._iasSmoothingLength
-        print "  vsSmoothingLength:", self._vsSmoothingLength
-
-        print "  useSimBrief:", self._useSimBrief
-        print "  simBriefUserName:", self._simBriefUserName
-        print "  rememberSimBriefPassword:", self._rememberSimBriefPassword
-
-        print "  pirepDirectory:", self._pirepDirectory
-        print "  pirepAutoSave:", self._pirepAutoSave
-
-        print "  defaultMSFS:", self._defaultMSFS
-
-        print "  enableSounds:", self._enableSounds
-
-        print "  pilotControlsSounds:", self._pilotControlsSounds
-        print "  pilotHotkey:", str(self._pilotHotkey)
-
-        print "  enableApproachCallouts:", self._enableApproachCallouts
-        print "  speedbrakeAtTD:", self._speedbrakeAtTD
-
-        print "  enableChecklists:", self._enableChecklists
-        print "  checklistHotkey:", str(self._checklistHotkey)
-
-        print "  autoUpdate:", self._autoUpdate
-        print "  updateURL:", self._updateURL
-
-        print "  messageTypeLevels:"
-        for (type, level) in self._messageTypeLevels.iteritems():
-            print "    %s: %s" % (const.messageType2string(type),
-                                  const.messageLevel2string(level))
-
-        print "  checklists:"
-        for (type, checklist) in self._checklists.iteritems():
-            print "    %s:" % (const.icaoCodes[type],)
+        print("  pilot ID:", self._pilotID)
+        print("  rememberPassword:", self._rememberPassword)
+
+        print("  language:", self._language)
+
+        print("  hideMinimizedWindow:", self._hideMinimizedWindow)
+        print("  quitOnClose:", self._quitOnClose)
+
+        print("  onlineGateSystem:", self._onlineGateSystem)
+        print("  onlineACARS:", self._onlineACARS)
+
+        print("  flareTimeFromFS:", self._flareTimeFromFS)
+        print("  syncFSTime:", self._syncFSTime)
+        print("  usingFS2Crew:", self._usingFS2Crew)
+
+        print("  iasSmoothingLength:", self._iasSmoothingLength)
+        print("  vsSmoothingLength:", self._vsSmoothingLength)
+
+        print("  useSimBrief:", self._useSimBrief)
+        print("  simBriefUserName:", self._simBriefUserName)
+        print("  rememberSimBriefPassword:", self._rememberSimBriefPassword)
+
+        print("  pirepDirectory:", self._pirepDirectory)
+        print("  pirepAutoSave:", self._pirepAutoSave)
+
+        print("  defaultMSFS:", self._defaultMSFS)
+
+        print("  enableSounds:", self._enableSounds)
+
+        print("  pilotControlsSounds:", self._pilotControlsSounds)
+        print("  pilotHotkey:", str(self._pilotHotkey))
+
+        print("  enableApproachCallouts:", self._enableApproachCallouts)
+        print("  speedbrakeAtTD:", self._speedbrakeAtTD)
+
+        print("  enableChecklists:", self._enableChecklists)
+        print("  checklistHotkey:", str(self._checklistHotkey))
+
+        print("  autoUpdate:", self._autoUpdate)
+        print("  updateURL:", self._updateURL)
+        print("  useRPC:", self._useRPC)
+
+        print("  messageTypeLevels:")
+        for (type, level) in self._messageTypeLevels.items():
+            print("    %s: %s" % (const.messageType2string(type),
+                                  const.messageLevel2string(level)))
+
+        print("  checklists:")
+        for (type, checklist) in self._checklists.items():
+            print("    %s:" % (const.icaoCodes[type],))
             for path in checklist:
-                print "      " + path
-
-        print "  approachCallouts:"
-        for (type, approachCallouts) in self._approachCallouts.iteritems():
-            print "    %s:" % (const.icaoCodes[type],)
+                print("      " + path)
+
+        print("  approachCallouts:")
+        for (type, approachCallouts) in self._approachCallouts.items():
+            print("    %s:" % (const.icaoCodes[type],))
             for (altitude, path) in approachCallouts:
-                print "      %d: %s" % (altitude, path)
+                print("      %d: %s" % (altitude, path))
 
 #-------------------------------------------------------------------------------
