migrate dbg,err to util.py
This commit is contained in:
parent
b15a78fdea
commit
5d1ea593d8
|
@ -45,20 +45,7 @@ except ImportError:
|
|||
gconf = None
|
||||
|
||||
from terminatorlib import translation
|
||||
|
||||
# set this to true to enable debugging output
|
||||
# These should be moved somewhere better.
|
||||
debug = False
|
||||
|
||||
def dbg (log = ""):
|
||||
"""Print a message if debugging is enabled"""
|
||||
if debug:
|
||||
print >> sys.stderr, log
|
||||
|
||||
def err (log = ""):
|
||||
"""Print an error message"""
|
||||
print >> sys.stderr, log
|
||||
|
||||
from terminatorlib.util import dbg, err
|
||||
from terminatorlib.configfile import ConfigFile, ParsedWithErrors
|
||||
|
||||
DEFAULTS = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import re
|
||||
from terminatorlib.config import dbg, debug
|
||||
from terminatorlib.util import dbg
|
||||
from terminatorlib import translation
|
||||
|
||||
def group(*choices): return '(' + '|'.join(choices) + ')'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Use of this file is unrestricted provided this notice is retained.
|
||||
# If you use it, it'd be nice if you dropped me a note. Also beer.
|
||||
|
||||
from terminatorlib.config import dbg, err
|
||||
from terminatorlib.util import dbg, err
|
||||
from terminatorlib.version import APP_NAME, APP_VERSION
|
||||
|
||||
import socket
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from terminatorlib.config import dbg,err,DEFAULTS,TerminatorConfValuestoreRC
|
||||
from terminatorlib.util import dbg,err
|
||||
from terminatorlib.config import DEFAULTS,TerminatorConfValuestoreRC
|
||||
from terminatorlib.keybindings import TerminatorKeybindings
|
||||
from terminatorlib.version import APP_NAME, APP_VERSION
|
||||
from terminatorlib import translation
|
||||
|
|
|
@ -25,7 +25,7 @@ import gobject, gtk, pango
|
|||
from terminatorlib.version import APP_NAME, APP_VERSION
|
||||
|
||||
from terminatorlib import config
|
||||
from config import dbg, err, debug
|
||||
from util import dbg, err, debug
|
||||
|
||||
from terminatorlib.keybindings import TerminatorKeybindings
|
||||
from terminatorlib.terminatorterm import TerminatorTerm
|
||||
|
|
|
@ -26,7 +26,7 @@ from terminatorlib.version import *
|
|||
|
||||
# import our configuration loader
|
||||
from terminatorlib import config
|
||||
from terminatorlib.config import dbg, err, debug
|
||||
from terminatorlib.util import dbg, err, debug
|
||||
|
||||
#import encoding list
|
||||
from terminatorlib.encoding import TerminatorEncoding
|
||||
|
|
Loading…
Reference in New Issue