Commit 9211213b authored by adam j hartz's avatar adam j hartz

change name of package

parent 75fd4e38
......@@ -18,5 +18,5 @@
# xonsh is Copyright (c) 2015-2016 the xonsh developers and is licensed under
# the MIT (Expat) license.
from tako.main import main
from takoshell.main import main
main()
......@@ -16,5 +16,5 @@
# xonsh is Copyright (c) 2015-2016 the xonsh developers and is licensed under
# the MIT (Expat) license.
from tako.main import main
from takoshell.main import main
main()
......@@ -26,15 +26,15 @@ import inspect
import pathlib
import builtins
import tako.environ
import takoshell.environ
from collections.abc import MutableMapping, Iterable, Sequence
from argparse import ArgumentParser
from tako.dirstack import cd, pushd, popd, dirs
from tako.jobs import jobs, fg, bg, clean_jobs
from tako.xoreutils import _which
from tako.completers._aliases import completer_alias
from takoshell.dirstack import cd, pushd, popd, dirs
from takoshell.jobs import jobs, fg, bg, clean_jobs
from takoshell.xoreutils import _which
from takoshell.completers._aliases import completer_alias
......
......@@ -36,8 +36,8 @@ from ast import Ellipsis # pylint: disable=redefined-builtin
import textwrap
import itertools
from tako.tools import subproc_toks, find_next_break
from tako.platform import PYTHON_VERSION_INFO
from takoshell.tools import subproc_toks, find_next_break
from takoshell.platform import PYTHON_VERSION_INFO
if PYTHON_VERSION_INFO >= (3, 5, 0):
# pylint: disable=unused-import
......
......@@ -22,13 +22,13 @@ import os
import sys
import builtins
from tako.tools import (TakoError, print_exception, check_for_partial_string,
from takoshell.tools import (TakoError, print_exception, check_for_partial_string,
COLORS_256, COLORS_TAKO)
from tako.codecache import (should_use_cache, code_cache_name,
from takoshell.codecache import (should_use_cache, code_cache_name,
code_cache_check, get_cache_filename,
update_cache, run_compiled_code)
from tako.completer import Completer
from tako.environ import multiline_prompt, format_prompt
from takoshell.completer import Completer
from takoshell.environ import multiline_prompt, format_prompt
class BaseShell(object):
......
......@@ -35,12 +35,12 @@ import sys
import tempfile
import time
from tako.braceexpand import braceexpand
from tako.environ import Env, default_env, locate_binary
from tako.jobs import add_job, wait_for_active_job
from tako.proc import (ProcProxy, SimpleProcProxy, pause_call_resume,
from takoshell.braceexpand import braceexpand
from takoshell.environ import Env, default_env, locate_binary
from takoshell.jobs import add_job, wait_for_active_job
from takoshell.proc import (ProcProxy, SimpleProcProxy, pause_call_resume,
CompletedCommand, HiddenCompletedCommand)
from tako.tools import (
from takoshell.tools import (
suggest_commands, expandvars, CommandsCache, globpath, TakoError,
TakoCalledProcessError
)
......
......@@ -19,14 +19,14 @@
import builtins
from collections import OrderedDict
from tako.completers.man import complete_from_man
from tako.completers.base import complete_base
from tako.completers.path import complete_path
from tako.completers.dirs import complete_cd, complete_rmdir
from tako.completers.python import (complete_python, complete_import,
from takoshell.completers.man import complete_from_man
from takoshell.completers.base import complete_base
from takoshell.completers.path import complete_path
from takoshell.completers.dirs import complete_cd, complete_rmdir
from takoshell.completers.python import (complete_python, complete_import,
complete_python_mode)
from tako.completers.commands import complete_skipper
from tako.completers.completer import complete_completer
from takoshell.completers.commands import complete_skipper
from takoshell.completers.completer import complete_completer
completers = OrderedDict([
('python_mode', complete_python_mode),
......
......@@ -20,8 +20,8 @@ import builtins
from collections import OrderedDict
from tako.completers.tools import justify
from tako.completers.bash import complete_from_bash, update_bash_completion
from takoshell.completers.tools import justify
from takoshell.completers.bash import complete_from_bash, update_bash_completion
VALID_ACTIONS = frozenset({'add', 'remove', 'list', 'bash'})
......@@ -169,7 +169,7 @@ Usage:
""".lstrip()
COMPLETER_REMOVE_HELP_STR = """
completer remove: removes a completer from tako
completer remove: removes a completer from takoshell
Usage:
completer remove NAME
......
......@@ -16,9 +16,9 @@
# xonsh is Copyright (c) 2015-2016 the xonsh developers and is licensed under
# the MIT (Expat) license.
from tako.completers.path import complete_path
from tako.completers.python import complete_python
from tako.completers.commands import complete_command
from takoshell.completers.path import complete_path
from takoshell.completers.python import complete_python
from takoshell.completers.commands import complete_command
def complete_base(prefix, line, start, end, ctx):
......
......@@ -27,7 +27,7 @@ import hashlib
from pathlib import Path
from tako.completers.path import _quote_paths
from takoshell.completers.path import _quote_paths
RE_DASHF = re.compile(r'-F\s+(\w+)')
......
......@@ -19,8 +19,8 @@
import os
import builtins
from tako.tools import executables_in
from tako.completers.tools import get_filter_function
from takoshell.tools import executables_in
from takoshell.completers.tools import get_filter_function
SKIP_TOKENS = {'sudo', 'time', 'timeit', 'which', 'showcmd', 'man'}
END_PROC_TOKENS = {'|', '||', '&&', 'and', 'or'}
......
......@@ -16,8 +16,8 @@
# xonsh is Copyright (c) 2015-2016 the xonsh developers and is licensed under
# the MIT (Expat) license.
from tako.completers.man import complete_from_man
from tako.completers.path import complete_dir
from takoshell.completers.man import complete_from_man
from takoshell.completers.path import complete_dir
def complete_cd(prefix, line, start, end, ctx):
......
......@@ -22,7 +22,7 @@ import pickle
import builtins
import subprocess
from tako.completers.tools import get_filter_function
from takoshell.completers.tools import get_filter_function
OPTIONS = None
OPTIONS_PATH = None
......
......@@ -21,10 +21,10 @@ import re
import ast
import builtins
from tako.tools import (check_for_partial_string, RE_STRING_START,
from takoshell.tools import (check_for_partial_string, RE_STRING_START,
iglobpath, levenshtein)
from tako.completers.tools import get_filter_function
from takoshell.completers.tools import get_filter_function
PATTERN_NEED_QUOTES = r'\s`\$\{\}\,\*\(\)"\'\?&'
PATTERN_NEED_QUOTES = '[' + PATTERN_NEED_QUOTES + ']' + r'|\band\b|\bor\b'
......
......@@ -24,10 +24,10 @@ import importlib
from collections.abc import Iterable
import tako.settings
from tako.tools import subexpr_from_unbalanced
import takoshell.settings
from takoshell.tools import subexpr_from_unbalanced
from tako.completers.tools import get_filter_function
from takoshell.completers.tools import get_filter_function
RE_ATTR = re.compile(r'([^\s\(\)]+(\.[^\s\(\)]+)*)\.(\w*)$')
......
......@@ -30,15 +30,15 @@ from warnings import warn
from collections import (MutableMapping, MutableSequence, MutableSet,
namedtuple)
from tako import __version__ as TAKO_VERSION
from tako.codecache import run_script_with_cache
from tako.dirstack import _get_cwd
from tako.platform import PATH_DEFAULT
from tako.tools import (always_true, always_false, ensure_string, is_env_path,
from takoshell import __version__ as TAKO_VERSION
from takoshell.codecache import run_script_with_cache
from takoshell.dirstack import _get_cwd
from takoshell.platform import PATH_DEFAULT
from takoshell.tools import (always_true, always_false, ensure_string, is_env_path,
str_to_env_path, env_path_to_str, DefaultNotGiven,
print_exception, EnvPath, executables_in, COLORS_256,
COLORS_TAKO)
import tako.settings
import takoshell.settings
LOCALE_CATS = {
......
......@@ -25,10 +25,10 @@ import builtins
import warnings
from collections import Mapping
from tako import ast
from tako.parser import Parser
from tako.tools import subproc_toks, find_next_break
from tako.built_ins import load_builtins, unload_builtins
from takoshell import ast
from takoshell.parser import Parser
from takoshell.tools import subproc_toks, find_next_break
from takoshell.built_ins import load_builtins, unload_builtins
class Execer(object):
......
......@@ -27,8 +27,8 @@ from importlib.machinery import ModuleSpec
import os
import sys
from tako.execer import Execer
from tako.platform import scandir
from takoshell.execer import Execer
from takoshell.platform import scandir
class TakoImportHook(MetaPathFinder, SourceLoader):
......
......@@ -25,7 +25,7 @@ import signal
import builtins
from collections import deque
from tako.platform import ON_DARWIN, ON_CYGWIN
from takoshell.platform import ON_DARWIN, ON_CYGWIN
tasks = deque()
# Track time stamp of last exit command, so that two consecutive attempts to
......
......@@ -25,10 +25,10 @@ Written using a hybrid of ``tokenize`` and PLY.
from io import BytesIO
from keyword import kwlist
from tako.ply.lex import LexToken
from takoshell.ply.lex import LexToken
from tako.platform import PYTHON_VERSION_INFO
import tako.tokenize as tokenize
from takoshell.platform import PYTHON_VERSION_INFO
import takoshell.tokenize as tokenize
token_map = {}
"""
......
......@@ -25,13 +25,13 @@ import builtins
from argparse import ArgumentParser, ArgumentTypeError, REMAINDER
from contextlib import contextmanager
from tako import __version__
from tako.shell import Shell
from tako.pretty import pretty
from tako.proc import HiddenCompletedCommand
from tako.jobs import ignore_sigtstp
from tako.environ import takorc_context
from tako.codecache import run_script_with_cache, run_code_with_cache
from takoshell import __version__
from takoshell.shell import Shell
from takoshell.pretty import pretty
from takoshell.proc import HiddenCompletedCommand
from takoshell.jobs import ignore_sigtstp
from takoshell.environ import takoshellrc_context
from takoshell.codecache import run_script_with_cache, run_code_with_cache
def path_argument(s):
"""Return a path only if the path is actually legal
......@@ -187,7 +187,7 @@ def premain(argv=None):
args.mode = TakoMode.interactive
shell_kwargs['completer'] = True
shell_kwargs['login'] = True
from tako import imphooks
from takoshell import imphooks
shell = builtins.__tako_shell__ = Shell(**shell_kwargs)
env = builtins.__tako_env__
takorc_context('config.tako', execer=shell.execer, initial=shell.ctx)
......
......@@ -18,11 +18,11 @@
# -*- coding: utf-8 -*-
"""Implements the tako parser."""
from tako.platform import PYTHON_VERSION_INFO
from takoshell.platform import PYTHON_VERSION_INFO
if PYTHON_VERSION_INFO > (3, 6):
from xonsh.parsers.v36 import Parser
elif PYTHON_VERSION_INFO > (3, 5):
from tako.parsers.v35 import Parser
from takoshell.parsers.v35 import Parser
else:
from tako.parsers.v34 import Parser
from takoshell.parsers.v34 import Parser
......@@ -23,14 +23,14 @@ import re
import sys
from collections import Iterable, Sequence, Mapping
from tako.ply import yacc
from tako import ast
from tako.ast import has_elts, tako_call
from tako.lexer import Lexer, LexToken
from tako.platform import PYTHON_VERSION_INFO
from tako.tokenize import SearchPath
from tako.parsers.context_check import check_contexts
from takoshell.ply import yacc
from takoshell import ast
from takoshell.ast import has_elts, tako_call
from takoshell.lexer import Lexer, LexToken
from takoshell.platform import PYTHON_VERSION_INFO
from takoshell.tokenize import SearchPath
from takoshell.parsers.context_check import check_contexts
class Location(object):
"""Location in a file."""
......
......@@ -18,8 +18,8 @@
# -*- coding: utf-8 -*-
"""Implements the tako parser for Python v3.4."""
from tako import ast
from tako.parsers.base import BaseParser
from takoshell import ast
from takoshell.parsers.base import BaseParser
class Parser(BaseParser):
......
......@@ -18,8 +18,8 @@
# -*- coding: utf-8 -*-
"""Implements the tako parser for Python v3.5."""
from tako import ast
from tako.parsers.base import BaseParser
from takoshell import ast
from takoshell.parsers.base import BaseParser
class Parser(BaseParser):
......
......@@ -34,7 +34,7 @@ from threading import Thread
from collections import Sequence, namedtuple
from subprocess import PIPE, DEVNULL, STDOUT
from tako.tools import (redirect_stdout, redirect_stderr,
from takoshell.tools import (redirect_stdout, redirect_stderr,
print_exception, TakoCalledProcessError)
......
......@@ -34,9 +34,9 @@ import importlib
from cmd import Cmd
from collections import deque
from tako.base_shell import BaseShell
from tako.tools import print_exception, check_for_partial_string
from tako.platform import ON_CYGWIN, ON_DARWIN
from takoshell.base_shell import BaseShell
from takoshell.tools import print_exception, check_for_partial_string
from takoshell.platform import ON_CYGWIN, ON_DARWIN
readline = None
RL_COMPLETION_SUPPRESS_APPEND = RL_LIB = RL_STATE = None
......
......@@ -21,9 +21,9 @@ import sys
import socket
import builtins
import tako.jobs
import tako.tools
import tako.aliases
import takoshell.jobs
import takoshell.tools
import takoshell.aliases
class Settings(dict):
def __init__(self, *args, **kwargs):
......
......@@ -18,8 +18,8 @@
# -*- coding: utf-8 -*-
"""The tako shell"""
from tako.environ import takorc_context
from tako.execer import Execer
from takoshell.environ import takoshellrc_context
from takoshell.execer import Execer
class Shell(object):
......@@ -46,7 +46,7 @@ class Shell(object):
self._init_environ(ctx, config, rc,
kwargs.get('scriptcache', True),
kwargs.get('cacheall', False))
from tako.readline_shell import ReadlineShell
from takoshell.readline_shell import ReadlineShell
self.shell = ReadlineShell(execer=self.execer,
ctx=self.ctx, **kwargs)
......
......@@ -44,7 +44,7 @@ import re
import sys
from token import *
from tako.platform import PYTHON_VERSION_INFO
from takoshell.platform import PYTHON_VERSION_INFO
cookie_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
......
......@@ -49,7 +49,7 @@ from warnings import warn
from subprocess import CalledProcessError
from collections import OrderedDict, Sequence, Set, abc
from tako.platform import scandir, DEFAULT_ENCODING, PYTHON_VERSION_INFO
from takoshell.platform import scandir, DEFAULT_ENCODING, PYTHON_VERSION_INFO
IS_SUPERUSER = os.getuid() == 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment