URI: 
       tUse environment variable else fallback to system app path. This enables runtime switching between styles without modifying Electrum, and avoids potential conflicts from implicit detection of a data/ subdirectory. - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit b0b24ae9ddcdc0966d0640a973c694d3707a3a90
   DIR parent 80d6c3ccb89f65e411e61630a026b3667ac9664f
  HTML Author: Amir Taaki <genjix@riseup.net>
       Date:   Sat,  7 Jul 2012 23:25:41 +0100
       
       Use environment variable else fallback to system app path. This enables runtime
       switching between styles without modifying Electrum, and avoids potential
       conflicts from implicit detection of a data/ subdirectory.
       
       Diffstat:
         M lib/gui_lite.py                     |      12 ++++++++----
       
       1 file changed, 8 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/lib/gui_lite.py b/lib/gui_lite.py
       t@@ -36,15 +36,19 @@ def resize_line_edit_width(line_edit, text_input):
            text_input += "A"
            line_edit.setMinimumWidth(metrics.width(text_input))
        
       +def cd_data_dir():
       +    try:
       +        data_dir = os.environ["ELECTRUM_DATA_PATH"]
       +    except KeyError:
       +        data_dir = appdata_dir()
       +    QDir.setCurrent(data_dir)
       +
        class ElectrumGui:
        
            def __init__(self, wallet):
                self.wallet = wallet
                self.app = QApplication(sys.argv)
       -        if os.path.exists("data"):
       -            QDir.setCurrent("data")
       -        else:
       -            QDir.setCurrent(appdata_dir())
       +        cd_data_dir()
                with open(rsrc("style.css")) as style_file:
                    self.app.setStyleSheet(style_file.read())