renamed over.core.textui to over.core.text
This commit is contained in:
parent
2f778e7c79
commit
93e8c12547
6 changed files with 14 additions and 13 deletions
2
aux.py
2
aux.py
|
@ -5,4 +5,4 @@ import sys
|
|||
|
||||
from . import core
|
||||
|
||||
_print = core.textui.Output('over', stream=sys.stderr)
|
||||
_print = core.text.Output('over', stream=sys.stderr)
|
||||
|
|
|
@ -6,10 +6,11 @@ from . import aux
|
|||
from . import cmd
|
||||
from . import file
|
||||
from . import misc
|
||||
from . import textui
|
||||
from . import text
|
||||
textui = text
|
||||
|
||||
try:
|
||||
from . import cython_types as types
|
||||
except:
|
||||
aux._print('unable to load C implementation, using python instead', textui.prefix.warn)
|
||||
aux._print('unable to load C implementation, using python instead', text.prefix.warn)
|
||||
from . import python_types as types
|
||||
|
|
12
core/app.py
12
core/app.py
|
@ -5,10 +5,10 @@ import sys
|
|||
import re
|
||||
|
||||
from . import file
|
||||
from . import textui
|
||||
from . import text
|
||||
from ..version import _version
|
||||
|
||||
prefix = textui.prefix
|
||||
prefix = text.prefix
|
||||
|
||||
# FIXME This very seriously needs to be heavily simplified and de-duplicated
|
||||
# TODO same parser for cmdline and Config
|
||||
|
@ -55,8 +55,8 @@ _over_help_texts = [
|
|||
|
||||
# --------------------------------------------------
|
||||
|
||||
def _output(text, indent=0, newlines=1):
|
||||
sys.stdout.write(textui.render(textui.paragraph(text, indent=indent), True))
|
||||
def _output(raw, indent=0, newlines=1):
|
||||
sys.stdout.write(text.render(text.paragraph(raw, indent=indent), True))
|
||||
sys.stdout.write(newlines * '\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
|
@ -229,7 +229,7 @@ class Main:
|
|||
self.cmdline = cmdline
|
||||
self.help_texts = [] # (chapter, [paragraphs])
|
||||
self.allow_exit = allow_exit
|
||||
self._print = textui.Output('over.core.app.Main')
|
||||
self._print = text.Output('over.core.app.Main')
|
||||
|
||||
if cfg_file:
|
||||
self.cfg_file = file.File(cfg_file, encoding='utf-8')
|
||||
|
@ -575,7 +575,7 @@ class Main:
|
|||
else:
|
||||
self._print('updating config file with option §B--§y%s§/' %(opt.name))
|
||||
new_lines.append('')
|
||||
new_lines.append(textui.paragraph(textui.render(opt.description, colors=False), prefix='#', width=80))
|
||||
new_lines.append(text.paragraph(text.render(opt.description, colors=False), prefix='#', width=80))
|
||||
new_lines.append('# *** data type: %s' %(opt.dtype))
|
||||
|
||||
if opt.plural:
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
import sys
|
||||
|
||||
from . import textui
|
||||
from . import text
|
||||
|
||||
_print = textui.Output('over.core', stream=sys.stderr)
|
||||
_print = text.Output('over.core', stream=sys.stderr)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import os
|
||||
|
||||
from .aux import _print
|
||||
from .textui import prefix
|
||||
from .text import prefix
|
||||
|
||||
# --------------------------------------------------
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ class Unit:
|
|||
return output
|
||||
|
||||
def __repr__(self):
|
||||
return 'over.core.textui.Unit(%s)' %(self)
|
||||
return 'over.core.text.Unit(%s)' %(self)
|
||||
|
||||
# --------------------------------------------------
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue