mercurial/util.py
changeset 6007 090b1a665901
parent 6006 3c9dbb743d20
child 6062 3c3b126e5619
--- a/mercurial/util.py	Sun Feb 03 19:29:05 2008 -0600
+++ b/mercurial/util.py	Sun Feb 03 19:29:05 2008 -0600
@@ -895,6 +895,10 @@
     function if need.'''
     return path.split(os.sep)
 
+def gui():
+    '''Are we running in a GUI?'''
+    return os.name == "nt" or os.name == "mac" or os.environ.get("DISPLAY")
+
 # Platform specific variants
 if os.name == 'nt':
     import msvcrt