Skip to content

Commit

Permalink
tools/ete.py: Make it load even if treeview (Qt) is not available.
Browse files Browse the repository at this point in the history
I think this way of making the ete4 command line needs a deep revision.
  • Loading branch information
jordibc committed Oct 31, 2023
1 parent e8dda13 commit 1582ea2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ete4/tools/ete.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@
TOOLSPATH = os.path.realpath(os.path.split(os.path.realpath(__file__))[0])

import argparse
from . import (ete_split, ete_expand, ete_annotate, ete_ncbiquery, ete_view,
from . import (ete_split, ete_expand, ete_annotate, ete_ncbiquery,
ete_generate, ete_mod, ete_extract, ete_compare, ete_evol,
ete_maptrees, ete_diff, ete_explore)
try:
from . import ete_view
except ImportError:
class DummyNamespace:
pass
ete_view = DummyNamespace()
ete_view.DESC = "Treeview module not available. It requires Qt."
ete_view.populate_args = lambda view_args_p: None
ete_view.run = lambda args: None

from . import common
from .common import log
from .utils import colorify, which
Expand Down

0 comments on commit 1582ea2

Please sign in to comment.