[Python-projects] hgview: search path for hgview.glade bad in local install?

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Jan 24 07:18:47 CET 2008


Hi all

With the following patch:

diff --git a/hgview/gtk/hgview_gtk.py b/hgview/gtk/hgview_gtk.py
--- a/hgview/gtk/hgview_gtk.py
+++ b/hgview/gtk/hgview_gtk.py
@@ -33,6 +33,7 @@ def load_glade(root=""):
    for _path in [dirname(__file__),
                  join(sys.exec_prefix, 'share/hgview'),
                  os.path.expanduser('~/share/hgview'),
+                  join(dirname(__file__), "../../../../share/hgview"),
                  join(dirname(__file__), "../../../../../share/hgview"),
                  ]:
        glade_file = join(_path, GLADE_FILE_NAME)

My setup as

 python setup.py install --home /home/peo/local

works. Without it, it does not find the hgview.glade file. So either
have both parent-relative paths, or drop the one with five backsteps
altogether.

Otherwise, good work! Looks far better than standard "hg view".

-peo


More information about the Python-Projects mailing list