")
self.assertAccess("from sys import ")
self.assertAccess("from sys import |path")
self.assertAccess("from sys| import path")
self.assertAccess("from s|ys import path")
self.assertAccess("from |sys import path")
self.assertAccess("from xml.dom import ")
# because syntax error
self.assertAccess("from xml.dom import Node.as|d")
class TestCurrentImport(LineTestCase):
def setUp(self):
self.func = current_import
def test_simple(self):
self.assertAccess("import ")
self.assertAccess("import ")
self.assertAccess("import |path")
self.assertAccess("import path, ")
self.assertAccess("import path another|")
self.assertAccess("if True: import ")
self.assertAccess("if True: import ")
self.assertAccess("if True: import ")
self.assertAccess("if True: import as something")
class TestMethodDefinitionName(LineTestCase):
def setUp(self):
self.func = current_method_definition_name
def test_simple(self):
self.assertAccess("def ")
self.assertAccess(" def bar(x, y)|:")
self.assertAccess(" def (x, y)")
class TestSingleWord(LineTestCase):
def setUp(self):
self.func = current_single_word
def test_simple(self):
self.assertAccess("foo.bar|")
self.assertAccess(".foo|")
self.assertAccess(" ")
class TestCurrentExpressionAttribute(LineTestCase):
def setUp(self):
self.func = current_expression_attribute
def test_simple(self):
self.assertAccess("Object..")
self.assertAccess("Object.<|attr1>.")
self.assertAccess("Object.(|)")
self.assertAccess("Object.another.(|)")
self.assertAccess("asdf asdf asdf.(abc|)")
def test_without_dot(self):
self.assertAccess("Object|")
self.assertAccess("Object|.")
self.assertAccess("|Object.")
def test_with_whitespace(self):
self.assertAccess("Object. ")
self.assertAccess("Object .")
self.assertAccess("Object . ")
self.assertAccess("Object .asdf attr|")
self.assertAccess("Object . attr")
self.assertAccess("Object. asdf attr|")
self.assertAccess("Object. attr")
self.assertAccess("Object . asdf attr|")
self.assertAccess("Object . attr")
def test_indexing(self):
self.assertAccess("abc[def].")
self.assertAccess("abc[def].<|ghi>")
self.assertAccess("abc[def].")
self.assertAccess("abc[def].gh |i")
self.assertAccess("abc[def]|")
def test_strings(self):
self.assertAccess('"hey".')
self.assertAccess('"hey"|')
self.assertAccess('"hey"|.a')
self.assertAccess('"hey".')
self.assertAccess('"hey".asdf d|')
self.assertAccess('"hey".<|>')
class TestCurrentDottedAttribute(LineTestCase):
def setUp(self):
self.func = current_dotted_attribute
def test_simple(self):
self.assertAccess("|")
self.assertAccess("(|")
self.assertAccess("[|")
self.assertAccess("m.body[0].value|")
self.assertAccess("m.body[0].attr.value|")
if __name__ == "__main__":
unittest.main()
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/test/test_manual_readline.py0000644000175000017500000002470514254577175021124 0ustar00useruserimport unittest
from bpython.curtsiesfrontend.manual_readline import (
left_arrow,
right_arrow,
beginning_of_line,
forward_word,
back_word,
end_of_line,
delete,
last_word_pos,
backspace,
delete_from_cursor_back,
delete_from_cursor_forward,
delete_rest_of_word,
delete_word_to_cursor,
transpose_character_before_cursor,
UnconfiguredEdits,
delete_word_from_cursor_back,
)
class TestManualReadline(unittest.TestCase):
def setUp(self):
self._line = "this is my test string"
def tearDown(self):
pass
def test_left_arrow_at_zero(self):
pos = 0
expected = (pos, self._line)
result = left_arrow(pos, self._line)
self.assertEqual(expected, result)
def test_left_arrow_at_non_zero(self):
for i in range(1, len(self._line)):
expected = (i - 1, self._line)
result = left_arrow(i, self._line)
self.assertEqual(expected, result)
def test_right_arrow_at_end(self):
pos = len(self._line)
expected = (pos, self._line)
result = right_arrow(pos, self._line)
self.assertEqual(expected, result)
def test_right_arrow_at_non_end(self):
for i in range(len(self._line) - 1):
expected = (i + 1, self._line)
result = right_arrow(i, self._line)
self.assertEqual(expected, result)
def test_beginning_of_line(self):
expected = (0, self._line)
for i in range(len(self._line)):
result = beginning_of_line(i, self._line)
self.assertEqual(expected, result)
def test_end_of_line(self):
expected = (len(self._line), self._line)
for i in range(len(self._line)):
result = end_of_line(i, self._line)
self.assertEqual(expected, result)
def test_forward_word(self):
line = "going from here to_here"
start_pos = 11
next_word_pos = 15
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
start_pos = 15
next_word_pos = 23
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
def test_forward_word_tabs(self):
line = "going from here to_here"
start_pos = 11
next_word_pos = 15
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
start_pos = 15
next_word_pos = 28
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
def test_forward_word_end(self):
line = "going from here to_here"
start_pos = 16
next_word_pos = 23
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
start_pos = 22
next_word_pos = 23
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
start_pos = 23
next_word_pos = 23
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
def test_forward_word_empty(self):
line = ""
start_pos = 0
next_word_pos = 0
expected = (next_word_pos, line)
result = forward_word(start_pos, line)
self.assertEqual(expected, result)
def test_back_word(self):
line = "going to here from_here"
start_pos = 14
prev_word_pos = 9
self.assertEqual(line[start_pos], "f")
self.assertEqual(line[prev_word_pos], "h")
expected = (prev_word_pos, line)
result = back_word(start_pos, line)
self.assertEqual(expected, result)
def test_last_word_pos(self):
line = "a word"
expected = 2
result = last_word_pos(line)
self.assertEqual(expected, result)
def test_last_word_pos_single_word(self):
line = "word"
expected = 0
result = last_word_pos(line)
self.assertEqual(expected, result)
def test_delete(self):
line = "deletion line"
pos = 3
expected = (3, "deltion line")
result = delete(pos, line)
self.assertEqual(expected, result)
def test_delete_from_cursor_back(self):
line = "everything before this will be deleted"
expected = (0, "this will be deleted")
result = delete_from_cursor_back(line.find("this"), line)
self.assertEqual(expected, result)
def test_delete_from_cursor_forward(self):
line = "everything after this will be deleted"
pos = line.find("this")
expected = (pos, "everything after ")
result = delete_from_cursor_forward(line.find("this"), line)[:-1]
self.assertEqual(expected, result)
self.assertEqual(delete_from_cursor_forward(0, ""), (0, "", ""))
def test_delete_rest_of_word(self):
self.try_stages_kill(
[
"z|s;df asdf d s;a;a",
"z|;df asdf d s;a;a",
"z| asdf d s;a;a",
"z| d s;a;a",
"z| s;a;a",
"z|;a;a",
"z|;a",
"z|",
"z|",
],
delete_rest_of_word,
)
def test_delete_word_to_cursor(self):
self.try_stages_kill(
[
" a;d sdf ;a;s;d; fjksald|a",
" a;d sdf ;a;s;d; |a",
" a;d sdf |a",
" a;d |a",
" |a",
"|a",
"|a",
],
delete_word_to_cursor,
)
def test_yank_prev_killed_text(self):
pass
def test_yank_prev_prev_killed_text(self):
pass
def try_stages(self, strings, func):
if not all("|" in s for s in strings):
raise ValueError("Need to use '|' to specify cursor")
stages = [(s.index("|"), s.replace("|", "")) for s in strings]
for (initial_pos, initial), (final_pos, final) in zip(
stages[:-1], stages[1:]
):
self.assertEqual(func(initial_pos, initial), (final_pos, final))
def try_stages_kill(self, strings, func):
if not all("|" in s for s in strings):
raise ValueError("Need to use '|' to specify cursor")
stages = [(s.index("|"), s.replace("|", "")) for s in strings]
for (initial_pos, initial), (final_pos, final) in zip(
stages[:-1], stages[1:]
):
self.assertEqual(
func(initial_pos, initial)[:-1], (final_pos, final)
)
def test_transpose_character_before_cursor(self):
self.try_stages(
[
"as|df asdf",
"ads|f asdf",
"adfs| asdf",
"adf s|asdf",
"adf as|sdf",
],
transpose_character_before_cursor,
)
def test_transpose_empty_line(self):
self.assertEqual(transpose_character_before_cursor(0, ""), (0, ""))
def test_transpose_first_character(self):
self.assertEqual(transpose_character_before_cursor(0, "a"), (0, "a"))
self.assertEqual(transpose_character_before_cursor(0, "as"), (0, "as"))
def test_transpose_end_of_line(self):
self.assertEqual(transpose_character_before_cursor(1, "a"), (1, "a"))
self.assertEqual(transpose_character_before_cursor(2, "as"), (2, "sa"))
def test_transpose_word_before_cursor(self):
pass
def test_backspace(self):
self.assertEqual(backspace(2, "as"), (1, "a"))
self.assertEqual(backspace(3, "as "), (2, "as"))
def test_delete_word_from_cursor_back(self):
self.try_stages_kill(
[
"asd;fljk asd;lfjas;dlkfj asdlk jasdf;ljk|",
"asd;fljk asd;lfjas;dlkfj asdlk jasdf;|",
"asd;fljk asd;lfjas;dlkfj asdlk |",
"asd;fljk asd;lfjas;dlkfj |",
"asd;fljk asd;lfjas;|",
"asd;fljk asd;|",
"asd;fljk |",
"asd;|",
"|",
"|",
],
delete_word_from_cursor_back,
)
self.try_stages_kill(
[" (( asdf |", " (( |", "|"], delete_word_from_cursor_back
)
class TestEdits(unittest.TestCase):
def setUp(self):
self.edits = UnconfiguredEdits()
def test_seq(self):
def f(cursor_offset, line):
return ("hi", 2)
self.edits.add("a", f)
self.assertIn("a", self.edits)
self.assertEqual(self.edits["a"], f)
self.assertEqual(
self.edits.call("a", cursor_offset=3, line="hello"), ("hi", 2)
)
with self.assertRaises(KeyError):
self.edits["b"]
with self.assertRaises(KeyError):
self.edits.call("b")
def test_functions_with_bad_signatures(self):
def f(something):
return (1, 2)
with self.assertRaises(TypeError):
self.edits.add("a", f)
def g(cursor_offset, line, something, something_else):
return (1, 2)
with self.assertRaises(TypeError):
self.edits.add("a", g)
def test_functions_with_bad_return_values(self):
def f(cursor_offset, line):
return ("hi",)
with self.assertRaises(ValueError):
self.edits.add("a", f)
def g(cursor_offset, line):
return ("hi", 1, 2, 3)
with self.assertRaises(ValueError):
self.edits.add("b", g)
def test_config(self):
def f(cursor_offset, line):
return ("hi", 2)
def g(cursor_offset, line):
return ("hey", 3)
self.edits.add_config_attr("att", f)
self.assertNotIn("att", self.edits)
class config:
att = "c"
key_dispatch = {"c": "c"}
configured_edits = self.edits.mapping_with_config(config, key_dispatch)
self.assertTrue(configured_edits.__contains__, "c")
self.assertNotIn("c", self.edits)
with self.assertRaises(NotImplementedError):
configured_edits.add_config_attr("att2", g)
with self.assertRaises(NotImplementedError):
configured_edits.add("d", g)
self.assertEqual(
configured_edits.call("c", cursor_offset=5, line="asfd"), ("hi", 2)
)
if __name__ == "__main__":
unittest.main()
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/test/test_preprocess.py0000644000175000017500000000644514254577175020172 0ustar00useruserimport difflib
import inspect
import re
import unittest
from code import compile_command as compiler
from functools import partial
from bpython.curtsiesfrontend.interpreter import code_finished_will_parse
from bpython.curtsiesfrontend.preprocess import preprocess
from bpython.test.fodder import original, processed
preproc = partial(preprocess, compiler=compiler)
def get_fodder_source(test_name):
pattern = rf"#StartTest-{test_name}\n(.*?)#EndTest"
orig, xformed = [
re.search(pattern, inspect.getsource(module), re.DOTALL)
for module in [original, processed]
]
if not orig:
raise ValueError(
f"Can't locate test {test_name} in original fodder file"
)
if not xformed:
raise ValueError(
f"Can't locate test {test_name} in processed fodder file"
)
return orig.group(1), xformed.group(1)
class TestPreprocessing(unittest.TestCase):
def assertCompiles(self, source):
finished, parsable = code_finished_will_parse(source, compiler)
return finished and parsable
def test_indent_empty_lines_nops(self):
self.assertEqual(preproc("hello"), "hello")
self.assertEqual(preproc("hello\ngoodbye"), "hello\ngoodbye")
self.assertEqual(preproc("a\n b\nc\n"), "a\n b\nc\n")
def assertShowWhitespaceEqual(self, a, b):
self.assertEqual(
a,
b,
"".join(
difflib.context_diff(
a.replace(" ", "~").splitlines(True),
b.replace(" ", "~").splitlines(True),
fromfile="actual",
tofile="expected",
n=5,
)
),
)
def assertDefinitionIndented(self, obj):
name = obj.__name__
obj2 = getattr(processed, name)
orig = inspect.getsource(obj)
xformed = inspect.getsource(obj2)
self.assertShowWhitespaceEqual(preproc(orig), xformed)
self.assertCompiles(xformed)
def assertLinesIndented(self, test_name):
orig, xformed = get_fodder_source(test_name)
self.assertShowWhitespaceEqual(preproc(orig), xformed)
self.assertCompiles(xformed)
def assertIndented(self, obj_or_name):
if isinstance(obj_or_name, str):
self.assertLinesIndented(obj_or_name)
else:
self.assertDefinitionIndented(obj_or_name)
def test_empty_line_between_methods(self):
self.assertIndented(original.BlankLineBetweenMethods)
def test_empty_line_within_class(self):
self.assertIndented(original.BlankLineInFunction)
def test_blank_lines_in_for_loop(self):
self.assertIndented("blank_lines_in_for_loop")
@unittest.skip(
"More advanced technique required: need to try compiling and "
"backtracking"
)
def test_blank_line_in_try_catch(self):
self.assertIndented("blank_line_in_try_catch")
@unittest.skip(
"More advanced technique required: need to try compiling and "
"backtracking"
)
def test_blank_line_in_try_catch_else(self):
self.assertIndented("blank_line_in_try_catch_else")
def test_blank_trailing_line(self):
self.assertIndented("blank_trailing_line")
def test_tabs(self):
self.assertIndented(original.tabs)
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/test/test_repl.py0000644000175000017500000005622514254577175016750 0ustar00useruserimport collections
import inspect
import socket
import sys
import tempfile
import unittest
from typing import List, Tuple
from itertools import islice
from pathlib import Path
from unittest import mock
from bpython import config, repl, cli, autocomplete
from bpython.line import LinePart
from bpython.test import (
MagicIterMock,
FixLanguageTestCase as TestCase,
TEST_CONFIG,
)
pypy = "PyPy" in sys.version
def setup_config(conf):
config_struct = config.Config(TEST_CONFIG)
if conf is not None and "autocomplete_mode" in conf:
config_struct.autocomplete_mode = conf["autocomplete_mode"]
return config_struct
class FakeHistory(repl.History):
def __init__(self):
pass
def reset(self):
pass
class FakeRepl(repl.Repl):
def __init__(self, conf=None):
super().__init__(repl.Interpreter(), setup_config(conf))
self._current_line = ""
self._cursor_offset = 0
def _get_current_line(self) -> str:
return self._current_line
def _set_current_line(self, val: str) -> None:
self._current_line = val
def _get_cursor_offset(self) -> int:
return self._cursor_offset
def _set_cursor_offset(self, val: int) -> None:
self._cursor_offset = val
def getstdout(self) -> str:
raise NotImplementedError
def reprint_line(
self, lineno: int, tokens: List[Tuple[repl._TokenType, str]]
) -> None:
raise NotImplementedError
def reevaluate(self):
raise NotImplementedError
class FakeCliRepl(cli.CLIRepl, FakeRepl):
def __init__(self):
self.s = ""
self.cpos = 0
self.rl_history = FakeHistory()
class TestMatchesIterator(unittest.TestCase):
def setUp(self):
self.matches = ["bobby", "bobbies", "bobberina"]
self.matches_iterator = repl.MatchesIterator()
self.matches_iterator.current_word = "bob"
self.matches_iterator.orig_line = "bob"
self.matches_iterator.orig_cursor_offset = len("bob")
self.matches_iterator.matches = self.matches
def test_next(self):
self.assertEqual(next(self.matches_iterator), self.matches[0])
for x in range(len(self.matches) - 1):
next(self.matches_iterator)
self.assertEqual(next(self.matches_iterator), self.matches[0])
self.assertEqual(next(self.matches_iterator), self.matches[1])
self.assertNotEqual(next(self.matches_iterator), self.matches[1])
def test_previous(self):
self.assertEqual(self.matches_iterator.previous(), self.matches[2])
for x in range(len(self.matches) - 1):
self.matches_iterator.previous()
self.assertNotEqual(self.matches_iterator.previous(), self.matches[0])
self.assertEqual(self.matches_iterator.previous(), self.matches[1])
self.assertEqual(self.matches_iterator.previous(), self.matches[0])
def test_nonzero(self):
"""self.matches_iterator should be False at start,
then True once we active a match.
"""
self.assertFalse(self.matches_iterator)
next(self.matches_iterator)
self.assertTrue(self.matches_iterator)
def test_iter(self):
slice = islice(self.matches_iterator, 0, 9)
self.assertEqual(list(slice), self.matches * 3)
def test_current(self):
with self.assertRaises(ValueError):
self.matches_iterator.current()
next(self.matches_iterator)
self.assertEqual(self.matches_iterator.current(), self.matches[0])
def test_update(self):
slice = islice(self.matches_iterator, 0, 3)
self.assertEqual(list(slice), self.matches)
newmatches = ["string", "str", "set"]
completer = mock.Mock()
completer.locate.return_value = LinePart(0, 1, "s")
self.matches_iterator.update(1, "s", newmatches, completer)
newslice = islice(newmatches, 0, 3)
self.assertNotEqual(list(slice), self.matches)
self.assertEqual(list(newslice), newmatches)
def test_cur_line(self):
completer = mock.Mock()
completer.locate.return_value = LinePart(
0,
self.matches_iterator.orig_cursor_offset,
self.matches_iterator.orig_line,
)
self.matches_iterator.completer = completer
with self.assertRaises(ValueError):
self.matches_iterator.cur_line()
self.assertEqual(next(self.matches_iterator), self.matches[0])
self.assertEqual(
self.matches_iterator.cur_line(),
(len(self.matches[0]), self.matches[0]),
)
def test_is_cseq(self):
self.assertTrue(self.matches_iterator.is_cseq())
class TestArgspec(unittest.TestCase):
def setUp(self):
self.repl = FakeRepl()
self.repl.push("def spam(a, b, c):\n", False)
self.repl.push(" pass\n", False)
self.repl.push("\n", False)
self.repl.push("class Spam(object):\n", False)
self.repl.push(" def spam(self, a, b, c):\n", False)
self.repl.push(" pass\n", False)
self.repl.push("\n", False)
self.repl.push("class SpammitySpam(object):\n", False)
self.repl.push(" def __init__(self, a, b, c):\n", False)
self.repl.push(" pass\n", False)
self.repl.push("\n", False)
self.repl.push("class WonderfulSpam(object):\n", False)
self.repl.push(" def __new__(self, a, b, c):\n", False)
self.repl.push(" pass\n", False)
self.repl.push("\n", False)
self.repl.push("o = Spam()\n", False)
self.repl.push("\n", False)
def set_input_line(self, line):
"""Set current input line of the test REPL."""
self.repl.current_line = line
self.repl.cursor_offset = len(line)
def test_func_name(self):
for (line, expected_name) in [
("spam(", "spam"),
# map pydoc has no signature in pypy
("spam(any([]", "any") if pypy else ("spam(map([]", "map"),
("spam((), ", "spam"),
]:
self.set_input_line(line)
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.current_func.__name__, expected_name)
def test_func_name_method_issue_479(self):
for (line, expected_name) in [
("o.spam(", "spam"),
# map pydoc has no signature in pypy
("o.spam(any([]", "any") if pypy else ("o.spam(map([]", "map"),
("o.spam((), ", "spam"),
]:
self.set_input_line(line)
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.current_func.__name__, expected_name)
def test_syntax_error_parens(self):
for line in ["spam(]", "spam([)", "spam())"]:
self.set_input_line(line)
# Should not explode
self.repl.get_args()
def test_kw_arg_position(self):
self.set_input_line("spam(a=0")
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.arg_pos, "a")
self.set_input_line("spam(1, b=1")
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.arg_pos, "b")
self.set_input_line("spam(1, c=2")
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.arg_pos, "c")
def test_lambda_position(self):
self.set_input_line("spam(lambda a, b: 1, ")
self.assertTrue(self.repl.get_args())
self.assertTrue(self.repl.funcprops)
# Argument position
self.assertEqual(self.repl.arg_pos, 1)
@unittest.skipIf(pypy, "range pydoc has no signature in pypy")
def test_issue127(self):
self.set_input_line("x=range(")
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.current_func.__name__, "range")
self.set_input_line("{x:range(")
self.assertTrue(self.repl.get_args())
self.assertEqual(self.repl.current_func.__name__, "range")
self.set_input_line("foo(1, 2, x,range(")
self.assertEqual(self.repl.current_func.__name__, "range")
self.set_input_line("(x,range(")
self.assertEqual(self.repl.current_func.__name__, "range")
def test_nonexistent_name(self):
self.set_input_line("spamspamspam(")
self.assertFalse(self.repl.get_args())
def test_issue572(self):
self.set_input_line("SpammitySpam(")
self.assertTrue(self.repl.get_args())
self.set_input_line("WonderfulSpam(")
self.assertTrue(self.repl.get_args())
@unittest.skipIf(pypy, "pypy pydoc doesn't have this")
def test_issue583(self):
self.repl = FakeRepl()
self.repl.push("a = 1.2\n", False)
self.set_input_line("a.is_integer(")
self.repl.set_docstring()
self.assertIsNot(self.repl.docstring, None)
def test_methods_of_expressions(self):
self.set_input_line("'a'.capitalize(")
self.assertTrue(self.repl.get_args())
self.set_input_line("(1 + 1.1).as_integer_ratio(")
self.assertTrue(self.repl.get_args())
class TestArgspecInternal(unittest.TestCase):
def test_function_expressions(self):
te = self.assertTupleEqual
fa = lambda line: repl.Repl._funcname_and_argnum(line)
for line, (func, argnum) in [
("spam(", ("spam", 0)),
("spam((), ", ("spam", 1)),
("spam.eggs((), ", ("spam.eggs", 1)),
("spam[abc].eggs((), ", ("spam[abc].eggs", 1)),
("spam[0].eggs((), ", ("spam[0].eggs", 1)),
("spam[a + b]eggs((), ", ("spam[a + b]eggs", 1)),
("spam().eggs((), ", ("spam().eggs", 1)),
("spam(1, 2).eggs((), ", ("spam(1, 2).eggs", 1)),
("spam(1, f(1)).eggs((), ", ("spam(1, f(1)).eggs", 1)),
("[0].eggs((), ", ("[0].eggs", 1)),
("[0][0]((), {}).eggs((), ", ("[0][0]((), {}).eggs", 1)),
("a + spam[0].eggs((), ", ("spam[0].eggs", 1)),
("spam(", ("spam", 0)),
("spam(map([]", ("map", 0)),
("spam((), ", ("spam", 1)),
]:
te(fa(line), (func, argnum))
class TestGetSource(unittest.TestCase):
def setUp(self):
self.repl = FakeRepl()
def set_input_line(self, line):
"""Set current input line of the test REPL."""
self.repl.current_line = line
self.repl.cursor_offset = len(line)
def assert_get_source_error_for_current_function(self, func, msg):
self.repl.current_func = func
with self.assertRaises(repl.SourceNotFound):
self.repl.get_source_of_current_name()
try:
self.repl.get_source_of_current_name()
except repl.SourceNotFound as e:
self.assertEqual(e.args[0], msg)
else:
self.fail("Should have raised SourceNotFound")
def test_current_function(self):
self.set_input_line("INPUTLINE")
self.repl.current_func = inspect.getsource
self.assertIn(
"text of the source code", self.repl.get_source_of_current_name()
)
self.assert_get_source_error_for_current_function(
[], "No source code found for INPUTLINE"
)
self.assert_get_source_error_for_current_function(
list.pop, "No source code found for INPUTLINE"
)
@unittest.skipIf(pypy, "different errors for PyPy")
def test_current_function_cpython(self):
self.set_input_line("INPUTLINE")
self.assert_get_source_error_for_current_function(
collections.defaultdict.copy, "No source code found for INPUTLINE"
)
self.assert_get_source_error_for_current_function(
collections.defaultdict, "could not find class definition"
)
def test_current_line(self):
self.repl.interp.locals["a"] = socket.socket
self.set_input_line("a")
self.assertIn("dup(self)", self.repl.get_source_of_current_name())
# TODO add tests for various failures without using current function
class TestEditConfig(TestCase):
def setUp(self):
self.repl = FakeRepl()
self.repl.interact.confirm = lambda msg: True
self.repl.interact.notify = lambda msg: None
self.repl.config.editor = "true"
def test_create_config(self):
with tempfile.TemporaryDirectory() as tmp_dir:
config_path = Path(tmp_dir) / "newdir" / "config"
self.repl.config.config_path = config_path
self.repl.edit_config()
self.assertTrue(config_path.exists())
class TestRepl(unittest.TestCase):
def set_input_line(self, line):
"""Set current input line of the test REPL."""
self.repl.current_line = line
self.repl.cursor_offset = len(line)
def setUp(self):
self.repl = FakeRepl()
def test_current_string(self):
self.set_input_line('a = "2"')
# TODO factor cpos out of repl.Repl
self.repl.cpos = 0
self.assertEqual(self.repl.current_string(), '"2"')
self.set_input_line('a = "2" + 2')
self.assertEqual(self.repl.current_string(), "")
def test_push(self):
self.repl = FakeRepl()
self.repl.push("foobar = 2")
self.assertEqual(self.repl.interp.locals["foobar"], 2)
# COMPLETE TESTS
# 1. Global tests
def test_simple_global_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("d")
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(
self.repl.matches_iter.matches,
["def", "del", "delattr(", "dict(", "dir(", "divmod("],
)
def test_substring_global_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SUBSTRING}
)
self.set_input_line("time")
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(
self.repl.matches_iter.matches, ["RuntimeError(", "RuntimeWarning("]
)
def test_fuzzy_global_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.FUZZY}
)
self.set_input_line("doc")
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(
self.repl.matches_iter.matches,
["ChildProcessError(", "UnboundLocalError(", "__doc__"],
)
# 2. Attribute tests
def test_simple_attribute_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("Foo.b")
code = "class Foo():\n\tdef bar(self):\n\t\tpass\n"
for line in code.split("\n"):
self.repl.push(line)
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(self.repl.matches_iter.matches, ["Foo.bar"])
def test_substring_attribute_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SUBSTRING}
)
self.set_input_line("Foo.az")
code = "class Foo():\n\tdef baz(self):\n\t\tpass\n"
for line in code.split("\n"):
self.repl.push(line)
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(self.repl.matches_iter.matches, ["Foo.baz"])
def test_fuzzy_attribute_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.FUZZY}
)
self.set_input_line("Foo.br")
code = "class Foo():\n\tdef bar(self):\n\t\tpass\n"
for line in code.split("\n"):
self.repl.push(line)
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(self.repl.matches_iter.matches, ["Foo.bar"])
# 3. Edge cases
def test_updating_namespace_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("foo")
self.repl.push("foobar = 2")
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(self.repl.matches_iter.matches, ["foobar"])
def test_file_should_not_appear_in_complete(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("_")
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertNotIn("__file__", self.repl.matches_iter.matches)
# 4. Parameter names
def test_paremeter_name_completion(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("foo(ab")
code = "def foo(abc=1, abd=2, xyz=3):\n\tpass\n"
for line in code.split("\n"):
self.repl.push(line)
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(
self.repl.matches_iter.matches, ["abc=", "abd=", "abs("]
)
def test_parameter_advanced_on_class(self):
self.repl = FakeRepl(
{"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
)
self.set_input_line("TestCls(app")
code = """
import inspect
class TestCls:
# A class with boring __init__ typing
def __init__(self, *args, **kwargs):
pass
# But that uses super exotic typings recognized by inspect.signature
__signature__ = inspect.Signature([
inspect.Parameter("apple", inspect.Parameter.POSITIONAL_ONLY),
inspect.Parameter("apple2", inspect.Parameter.KEYWORD_ONLY),
inspect.Parameter("pinetree", inspect.Parameter.KEYWORD_ONLY),
])
"""
for line in code.split("\n"):
print(line[8:])
self.repl.push(line[8:])
self.assertTrue(self.repl.complete())
self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
self.assertEqual(self.repl.matches_iter.matches, ["apple2=", "apple="])
class TestCliRepl(unittest.TestCase):
def setUp(self):
self.repl = FakeCliRepl()
def test_atbol(self):
self.assertTrue(self.repl.atbol())
self.repl.s = "\t\t"
self.assertTrue(self.repl.atbol())
self.repl.s = "\t\tnot an empty line"
self.assertFalse(self.repl.atbol())
def test_addstr(self):
self.repl.complete = mock.Mock(True)
self.repl.s = "foo"
self.repl.addstr("bar")
self.assertEqual(self.repl.s, "foobar")
self.repl.cpos = 3
self.repl.addstr("buzz")
self.assertEqual(self.repl.s, "foobuzzbar")
class TestCliReplTab(unittest.TestCase):
def setUp(self):
self.repl = FakeCliRepl()
# 3 Types of tab complete
def test_simple_tab_complete(self):
self.repl.matches_iter = MagicIterMock()
self.repl.matches_iter.__bool__.return_value = False
self.repl.complete = mock.Mock()
self.repl.print_line = mock.Mock()
self.repl.matches_iter.is_cseq.return_value = False
self.repl.show_list = mock.Mock()
self.repl.funcprops = mock.Mock()
self.repl.arg_pos = mock.Mock()
self.repl.matches_iter.cur_line.return_value = (None, "foobar")
self.repl.s = "foo"
self.repl.tab()
self.assertTrue(self.repl.complete.called)
self.repl.complete.assert_called_with(tab=True)
self.assertEqual(self.repl.s, "foobar")
@unittest.skip("disabled while non-simple completion is disabled")
def test_substring_tab_complete(self):
self.repl.s = "bar"
self.repl.config.autocomplete_mode = (
autocomplete.AutocompleteModes.FUZZY
)
self.repl.tab()
self.assertEqual(self.repl.s, "foobar")
self.repl.tab()
self.assertEqual(self.repl.s, "foofoobar")
@unittest.skip("disabled while non-simple completion is disabled")
def test_fuzzy_tab_complete(self):
self.repl.s = "br"
self.repl.config.autocomplete_mode = (
autocomplete.AutocompleteModes.FUZZY
)
self.repl.tab()
self.assertEqual(self.repl.s, "foobar")
# Edge Cases
def test_normal_tab(self):
"""make sure pressing the tab key will
still in some cases add a tab"""
self.repl.s = ""
self.repl.config = mock.Mock()
self.repl.config.tab_length = 4
self.repl.complete = mock.Mock()
self.repl.print_line = mock.Mock()
self.repl.tab()
self.assertEqual(self.repl.s, " ")
def test_back_parameter(self):
self.repl.matches_iter = mock.Mock()
self.repl.matches_iter.matches = True
self.repl.matches_iter.previous.return_value = "previtem"
self.repl.matches_iter.is_cseq.return_value = False
self.repl.show_list = mock.Mock()
self.repl.funcprops = mock.Mock()
self.repl.arg_pos = mock.Mock()
self.repl.matches_iter.cur_line.return_value = (None, "previtem")
self.repl.print_line = mock.Mock()
self.repl.s = "foo"
self.repl.cpos = 0
self.repl.tab(back=True)
self.assertTrue(self.repl.matches_iter.previous.called)
self.assertTrue(self.repl.s, "previtem")
# Attribute Tests
@unittest.skip("disabled while non-simple completion is disabled")
def test_fuzzy_attribute_tab_complete(self):
"""Test fuzzy attribute with no text"""
self.repl.s = "Foo."
self.repl.config.autocomplete_mode = (
autocomplete.AutocompleteModes.FUZZY
)
self.repl.tab()
self.assertEqual(self.repl.s, "Foo.foobar")
@unittest.skip("disabled while non-simple completion is disabled")
def test_fuzzy_attribute_tab_complete2(self):
"""Test fuzzy attribute with some text"""
self.repl.s = "Foo.br"
self.repl.config.autocomplete_mode = (
autocomplete.AutocompleteModes.FUZZY
)
self.repl.tab()
self.assertEqual(self.repl.s, "Foo.foobar")
# Expand Tests
def test_simple_expand(self):
self.repl.s = "f"
self.cpos = 0
self.repl.matches_iter = mock.Mock()
self.repl.matches_iter.is_cseq.return_value = True
self.repl.matches_iter.substitute_cseq.return_value = (3, "foo")
self.repl.print_line = mock.Mock()
self.repl.tab()
self.assertEqual(self.repl.s, "foo")
@unittest.skip("disabled while non-simple completion is disabled")
def test_substring_expand_forward(self):
self.repl.config.autocomplete_mode = (
autocomplete.AutocompleteModes.SUBSTRING
)
self.repl.s = "ba"
self.repl.tab()
self.assertEqual(self.repl.s, "bar")
@unittest.skip("disabled while non-simple completion is disabled")
def test_fuzzy_expand(self):
pass
if __name__ == "__main__":
unittest.main()
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/test/test_simpleeval.py0000644000175000017500000001112314254577175020133 0ustar00useruserimport ast
import numbers
import sys
import unittest
from bpython.simpleeval import (
simple_eval,
evaluate_current_expression,
EvaluationError,
)
class TestSimpleEval(unittest.TestCase):
def assertMatchesStdlib(self, expr):
self.assertEqual(ast.literal_eval(expr), simple_eval(expr))
def test_matches_stdlib(self):
"""Should match the stdlib literal_eval if no names or indexing"""
self.assertMatchesStdlib("[1]")
self.assertMatchesStdlib("{(1,): [2,3,{}]}")
self.assertMatchesStdlib("{1, 2}")
@unittest.skipUnless(
sys.version_info[:2] >= (3, 9), "Only Python3.9 evaluates set()"
)
def test_matches_stdlib_set_literal(self):
"""set() is evaluated"""
self.assertMatchesStdlib("set()")
def test_indexing(self):
"""Literals can be indexed into"""
self.assertEqual(simple_eval("[1,2][0]"), 1)
def test_name_lookup(self):
"""Names can be looked up in a namespace"""
self.assertEqual(simple_eval("a", {"a": 1}), 1)
self.assertEqual(simple_eval("map"), map)
def test_name_lookup_indexing(self):
"""Names can be looked up in a namespace"""
self.assertEqual(simple_eval("a[b]", {"a": {"c": 1}, "b": "c"}), 1)
def test_lookup_on_suspicious_types(self):
class FakeDict:
pass
with self.assertRaises(ValueError):
simple_eval("a[1]", {"a": FakeDict()})
class TrickyDict(dict):
def __getitem__(self, index):
self.fail("doing key lookup isn't safe")
with self.assertRaises(ValueError):
simple_eval("a[1]", {"a": TrickyDict()})
class SchrodingersDict(dict):
def __getattribute__(inner_self, attr):
self.fail("doing attribute lookup might have side effects")
with self.assertRaises(ValueError):
simple_eval("a[1]", {"a": SchrodingersDict()})
class SchrodingersCatsDict(dict):
def __getattr__(inner_self, attr):
self.fail("doing attribute lookup might have side effects")
with self.assertRaises(ValueError):
simple_eval("a[1]", {"a": SchrodingersDict()})
def test_operators_on_suspicious_types(self):
class Spam(numbers.Number):
def __add__(inner_self, other):
self.fail("doing attribute lookup might have side effects")
with self.assertRaises(ValueError):
simple_eval("a + 1", {"a": Spam()})
def test_operators_on_numbers(self):
self.assertEqual(simple_eval("-2"), -2)
self.assertEqual(simple_eval("1 + 1"), 2)
self.assertEqual(simple_eval("a - 2", {"a": 1}), -1)
with self.assertRaises(ValueError):
simple_eval("2 * 3")
with self.assertRaises(ValueError):
simple_eval("2 ** 3")
def test_function_calls_raise(self):
with self.assertRaises(ValueError):
simple_eval("1()")
def test_nonexistant_names_raise(self):
with self.assertRaises(EvaluationError):
simple_eval("a")
def test_attribute_access(self):
class Foo:
abc = 1
self.assertEqual(simple_eval("foo.abc", {"foo": Foo()}), 1)
class TestEvaluateCurrentExpression(unittest.TestCase):
def assertEvaled(self, line, value, ns=None):
assert line.count("|") == 1
cursor_offset = line.find("|")
line = line.replace("|", "")
self.assertEqual(
evaluate_current_expression(cursor_offset, line, ns), value
)
def assertCannotEval(self, line, ns=None):
assert line.count("|") == 1
cursor_offset = line.find("|")
line = line.replace("|", "")
with self.assertRaises(EvaluationError):
evaluate_current_expression(cursor_offset, line, ns)
def test_simple(self):
self.assertEvaled("[1].a|bc", [1])
self.assertEvaled("[1].abc|", [1])
self.assertEvaled("[1].|abc", [1])
self.assertEvaled("[1]. |abc", [1])
self.assertEvaled("[1] .|abc", [1])
self.assertCannotEval("[1].abc |", [1])
self.assertCannotEval("[1]. abc |", [1])
self.assertCannotEval("[2][1].a|bc", [1])
def test_nonsense(self):
self.assertEvaled("!@#$ [1].a|bc", [1])
self.assertEvaled("--- [2][0].a|bc", 2)
self.assertCannotEval('"asdf".centered()[1].a|bc')
self.assertEvaled('"asdf"[1].a|bc', "s")
def test_with_namespace(self):
self.assertEvaled("a[1].a|bc", "d", {"a": "adsf"})
self.assertCannotEval("a[1].a|bc", {})
if __name__ == "__main__":
unittest.main()
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.145035
bpython-0.24/bpython/translations/0000755000175000017500000000000014361765332016116 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046093.0
bpython-0.24/bpython/translations/__init__.py0000644000175000017500000000206414361765215020231 0ustar00useruserimport gettext
import locale
import os.path
import sys
from typing import Optional, cast, List
from .. import package_dir
translator: gettext.NullTranslations = cast(gettext.NullTranslations, None)
def _(message) -> str:
return translator.gettext(message)
def ngettext(singular, plural, n):
return translator.ngettext(singular, plural, n)
def init(
locale_dir: Optional[str] = None, languages: Optional[List[str]] = None
) -> None:
try:
locale.setlocale(locale.LC_ALL, "")
except locale.Error:
# This means that the user's environment is broken. Let's just continue
# with the default C locale.
sys.stderr.write(
"Error: Your locale settings are not supported by "
"the system. Using the fallback 'C' locale instead. "
"Please fix your locale settings.\n"
)
global translator
if locale_dir is None:
locale_dir = os.path.join(package_dir, "translations")
translator = gettext.translation(
"bpython", locale_dir, languages, fallback=True
)
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/bpython/translations/de/0000755000175000017500000000000014361765332016506 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.145035
bpython-0.24/bpython/translations/de/LC_MESSAGES/0000755000175000017500000000000014361765332020273 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/translations/de/LC_MESSAGES/bpython.po0000644000175000017500000003003514254577175022326 0ustar00useruser# German translations for bpython.
# Copyright (C) 2012-2021 bpython developers
# This file is distributed under the same license as the bpython project.
# Sebastian Ramacher , 2012-2021.
#
msgid ""
msgstr ""
"Project-Id-Version: bpython mercurial\n"
"Report-Msgid-Bugs-To: http://github.com/bpython/bpython/issues\n"
"POT-Creation-Date: 2021-10-12 21:58+0200\n"
"PO-Revision-Date: 2021-02-14 17:31+0100\n"
"Last-Translator: Sebastian Ramacher \n"
"Language: de\n"
"Language-Team: de \n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: bpython/args.py:63
msgid "{} version {} on top of Python {} {}"
msgstr "{} Version {} mit Python {} {}"
#: bpython/args.py:72
msgid "{} See AUTHORS.rst for details."
msgstr "{} Siehe AUTHORS.rst für mehr Details."
#: bpython/args.py:116
#, python-format
msgid ""
"Usage: %(prog)s [options] [file [args]]\n"
"NOTE: If bpython sees an argument it does not know, execution falls back "
"to the regular Python interpreter."
msgstr ""
"Verwendung: %(prog)s [Optionen] [Datei [Argumente]]\n"
"Hinweis: Wenn bpython Argumente übergeben bekommt, die nicht verstanden "
"werden, wird der normale Python Interpreter ausgeführt."
#: bpython/args.py:127
msgid "Use CONFIG instead of default config file."
msgstr "Verwende CONFIG antatt der standardmäßigen Konfigurationsdatei."
#: bpython/args.py:133
msgid "Drop to bpython shell after running file instead of exiting."
msgstr "Verbleibe in bpython nach dem Ausführen der Datei."
#: bpython/args.py:139
msgid "Don't flush the output to stdout."
msgstr "Gib Ausgabe beim Beenden nicht ernaut auf stdout aus."
#: bpython/args.py:145
msgid "Print version and exit."
msgstr "Zeige Versionsinformationen an und beende."
#: bpython/args.py:152
msgid "Set log level for logging"
msgstr "Log-Stufe"
#: bpython/args.py:157
msgid "Log output file"
msgstr "Datei für Ausgabe von Log-Nachrichten"
#: bpython/args.py:168
msgid "File to execute and additional arguments passed on to the executed script."
msgstr ""
"Auszuführende Datei und zusätzliche Argumente, die an das Script "
"übergeben werden sollen."
#: bpython/cli.py:320 bpython/curtsiesfrontend/interaction.py:107
#: bpython/urwid.py:539
msgid "y"
msgstr "j"
#: bpython/cli.py:320 bpython/urwid.py:539
msgid "yes"
msgstr "ja"
#: bpython/cli.py:1696
msgid "Rewind"
msgstr "Rückgängig"
#: bpython/cli.py:1697
msgid "Save"
msgstr "Speichern"
#: bpython/cli.py:1698
msgid "Pastebin"
msgstr "Pastebin"
#: bpython/cli.py:1699
msgid "Pager"
msgstr ""
#: bpython/cli.py:1700
msgid "Show Source"
msgstr "Quellcode anzeigen"
#: bpython/cli.py:1947
msgid ""
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
"ACHTUNG: `bpython-cli` wird verwendet, die curses Implementierung von "
"`bpython`. Diese Implementierung wird ab Version 0.19 nicht mehr aktiv "
"unterstützt und wird in einer zukünftigen Version entfernt werden."
#: bpython/curtsies.py:201
msgid "start by pasting lines of a file into session"
msgstr ""
#: bpython/curtsies.py:207
msgid "curtsies arguments"
msgstr "Argumente für curtsies"
#: bpython/curtsies.py:208
msgid "Additional arguments specific to the curtsies-based REPL."
msgstr "Zusätzliche Argumente spezifisch für die curtsies-basierte REPL."
#: bpython/history.py:250
#, python-format
msgid "Error occurred while writing to file %s (%s)"
msgstr "Fehler beim Schreiben in Datei %s aufgetreten (%s)"
#: bpython/paste.py:85
msgid "Helper program not found."
msgstr "Hilfsprogramm konnte nicht gefunden werden."
#: bpython/paste.py:87
msgid "Helper program could not be run."
msgstr "Hilfsprogramm konnte nicht ausgeführt werden."
#: bpython/paste.py:93
#, python-format
msgid "Helper program returned non-zero exit status %d."
msgstr "Hilfsprogramm beendete mit Status %d."
#: bpython/paste.py:98
msgid "No output from helper program."
msgstr "Keine Ausgabe von Hilfsprogramm vorhanden."
#: bpython/paste.py:105
msgid "Failed to recognize the helper program's output as an URL."
msgstr "Konnte Ausgabe von Hilfsprogramm nicht verarbeiten."
#: bpython/repl.py:644
msgid "Nothing to get source of"
msgstr "Nichts um Quellcode abzurufen"
#: bpython/repl.py:649
#, python-format
msgid "Cannot get source: %s"
msgstr "Kann Quellcode nicht finden: %s"
#: bpython/repl.py:654
#, python-format
msgid "Cannot access source of %r"
msgstr "Kann auf Quellcode nicht zugreifen: %r"
#: bpython/repl.py:656
#, python-format
msgid "No source code found for %s"
msgstr "Quellcode für %s nicht gefunden"
#: bpython/repl.py:801
msgid "Save to file (Esc to cancel): "
msgstr "In Datei speichern (Esc um abzubrechen): "
#: bpython/repl.py:803 bpython/repl.py:806 bpython/repl.py:830
msgid "Save cancelled."
msgstr "Speichern abgebrochen."
#: bpython/repl.py:817
#, python-format
msgid "%s already exists. Do you want to (c)ancel, (o)verwrite or (a)ppend? "
msgstr "%s existiert bereit. (C) abbrechen, (o) überschrieben oder (a) anhängen? "
#: bpython/repl.py:825
msgid "overwrite"
msgstr "überschreiben"
#: bpython/repl.py:827
msgid "append"
msgstr "anhängen"
#: bpython/repl.py:839 bpython/repl.py:1143
#, python-format
msgid "Error writing file '%s': %s"
msgstr "Fehler beim Schreiben in Datei '%s': %s"
#: bpython/repl.py:841
#, python-format
msgid "Saved to %s."
msgstr "Nach %s gespeichert."
#: bpython/repl.py:847
msgid "No clipboard available."
msgstr "Zwischenablage ist nicht verfügbar."
#: bpython/repl.py:854
msgid "Could not copy to clipboard."
msgstr "Konnte nicht in Zwischenablage kopieren."
#: bpython/repl.py:856
msgid "Copied content to clipboard."
msgstr "Inhalt wurde in Zwischenablage kopiert."
#: bpython/repl.py:865
msgid "Pastebin buffer? (y/N) "
msgstr "Buffer bei Pastebin hochladen? (j/N)"
#: bpython/repl.py:867
msgid "Pastebin aborted."
msgstr "Hochladen zu Pastebin abgebrochen."
#: bpython/repl.py:875
#, python-format
msgid "Duplicate pastebin. Previous URL: %s. Removal URL: %s"
msgstr ""
"Duplizierte Daten zu Pastebin hochgeladen. Vorherige URL: %s. URL zum "
"Löschen: %s"
#: bpython/repl.py:881
msgid "Posting data to pastebin..."
msgstr "Lade Daten hoch zu Pastebin..."
#: bpython/repl.py:885
#, python-format
msgid "Upload failed: %s"
msgstr "Hochladen ist fehlgeschlagen: %s"
#: bpython/repl.py:894
#, python-format
msgid "Pastebin URL: %s - Removal URL: %s"
msgstr "Pastebin URL: %s - URL zum Löschen: %s"
#: bpython/repl.py:899
#, python-format
msgid "Pastebin URL: %s"
msgstr "Pastebin URL: %s"
#: bpython/repl.py:937
#, python-format
msgid "Undo how many lines? (Undo will take up to ~%.1f seconds) [1]"
msgstr ""
"Wie viele Zeilen rückgängig machen? (Rückgängigmachen wird bis zu ~%.1f "
"Sekunden brauchen) [1]"
#: bpython/repl.py:945 bpython/repl.py:949
msgid "Undo canceled"
msgstr "Rückgängigmachen abgebrochen"
#: bpython/repl.py:952
#, python-format
msgid "Undoing %d line... (est. %.1f seconds)"
msgid_plural "Undoing %d lines... (est. %.1f seconds)"
msgstr[0] "Mache %d Zeile rückgängig... (ungefähr %.1f Sekunden)"
msgstr[1] "Mache %d Zeilen rückgängig... (ungefähr %.1f Sekunden)"
#: bpython/repl.py:1128
msgid "Config file does not exist - create new from default? (y/N)"
msgstr ""
"Konfigurationsdatei existiert nicht. Soll eine neue Datei erstellt "
"werden? (j/N)"
#: bpython/repl.py:1153
msgid "bpython config file edited. Restart bpython for changes to take effect."
msgstr ""
"bpython Konfigurationsdatei bearbeitet. Starte bpython neu damit die "
"Änderungen übernommen werden."
#: bpython/repl.py:1158
#, python-format
msgid "Error editing config file: %s"
msgstr "Fehler beim Bearbeiten der Konfigurationsdatei: %s"
#: bpython/urwid.py:606
#, python-format
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
msgstr ""
" <%s> Rückgängigmachen <%s> Speichern <%s> Pastebin <%s> Pager <%s> "
"Quellcode anzeigen "
#: bpython/urwid.py:1116
msgid "Run twisted reactor."
msgstr "Führe twisted reactor aus."
#: bpython/urwid.py:1121
msgid "Select specific reactor (see --help-reactors). Implies --twisted."
msgstr "Wähle reactor aus (siehe --help-reactors). Impliziert --twisted."
#: bpython/urwid.py:1129
msgid "List available reactors for -r."
msgstr "Liste verfügbare reactors für -r auf."
#: bpython/urwid.py:1134
msgid ""
"twistd plugin to run (use twistd for a list). Use \"--\" to pass further "
"options to the plugin."
msgstr ""
"Auszuführendes twistd Plugin (starte twistd für eine Liste). Verwende "
"\"--\" um Optionen an das Plugin zu übergeben."
#: bpython/urwid.py:1143
msgid "Port to run an eval server on (forces Twisted)."
msgstr ""
#: bpython/urwid.py:1337
msgid ""
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
"ACHTUNG: `bpython-urwid` wird verwendet, die curses Implementierung von "
"`bpython`. Diese Implementierung wird ab Version 0.19 nicht mehr aktiv "
"unterstützt und wird in einer zukünftigen Version entfernt werden."
#: bpython/curtsiesfrontend/repl.py:339
msgid "Welcome to bpython!"
msgstr "Willkommen by bpython!"
#: bpython/curtsiesfrontend/repl.py:341
#, python-format
msgid "Press <%s> for help."
msgstr "Drücke <%s> für Hilfe."
#: bpython/curtsiesfrontend/repl.py:681
#, python-format
msgid "Executing PYTHONSTARTUP failed: %s"
msgstr "Fehler beim Ausführen von PYTHONSTARTUP: %s"
#: bpython/curtsiesfrontend/repl.py:698
#, python-format
msgid "Reloaded at %s because %s modified."
msgstr "Bei %s neugeladen, da %s modifiziert wurde."
#: bpython/curtsiesfrontend/repl.py:1008
msgid "Session not reevaluated because it was not edited"
msgstr "Die Sitzung wurde nicht neu ausgeführt, da sie nicht berabeitet wurde"
#: bpython/curtsiesfrontend/repl.py:1023
msgid "Session not reevaluated because saved file was blank"
msgstr "Die Sitzung wurde nicht neu ausgeführt, da die gespeicherte Datei leer war"
#: bpython/curtsiesfrontend/repl.py:1033
msgid "Session edited and reevaluated"
msgstr "Sitzung bearbeitet und neu ausgeführt"
#: bpython/curtsiesfrontend/repl.py:1044
#, python-format
msgid "Reloaded at %s by user."
msgstr "Bei %s vom Benutzer neu geladen."
#: bpython/curtsiesfrontend/repl.py:1050
msgid "Auto-reloading deactivated."
msgstr "Automatisches Neuladen deaktiviert."
#: bpython/curtsiesfrontend/repl.py:1055
msgid "Auto-reloading active, watching for file changes..."
msgstr "Automatisches Neuladen ist aktiv; beobachte Dateiänderungen..."
#: bpython/curtsiesfrontend/repl.py:1061
msgid "Auto-reloading not available because watchdog not installed."
msgstr ""
"Automatisches Neuladen ist nicht verfügbar da watchdog nicht installiert "
"ist."
#: bpython/curtsiesfrontend/repl.py:2011
msgid ""
"\n"
"Thanks for using bpython!\n"
"\n"
"See http://bpython-interpreter.org/ for more information and http://docs"
".bpython-interpreter.org/ for docs.\n"
"Please report issues at https://github.com/bpython/bpython/issues\n"
"\n"
"Features:\n"
"Try using undo ({config.undo_key})!\n"
"Edit the current line ({config.edit_current_block_key}) or the entire "
"session ({config.external_editor_key}) in an external editor. (currently "
"{config.editor})\n"
"Save sessions ({config.save_key}) or post them to pastebins "
"({config.pastebin_key})! Current pastebin helper: "
"{config.pastebin_helper}\n"
"Reload all modules and rerun session ({config.reimport_key}) to test out "
"changes to a module.\n"
"Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute "
"the current session when a module you've imported is modified.\n"
"\n"
"bpython -i your_script.py runs a file in interactive mode\n"
"bpython -t your_script.py pastes the contents of a file into the session\n"
"\n"
"A config file at {config.config_path} customizes keys and behavior of "
"bpython.\n"
"You can also set which pastebin helper and which external editor to use.\n"
"See {example_config_url} for an example config file.\n"
"Press {config.edit_config_key} to edit this config file.\n"
msgstr ""
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/bpython/translations/es_ES/0000755000175000017500000000000014361765332017114 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.146035
bpython-0.24/bpython/translations/es_ES/LC_MESSAGES/0000755000175000017500000000000014361765332020701 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/translations/es_ES/LC_MESSAGES/bpython.po0000644000175000017500000002115114254577175022733 0ustar00useruser# Spanish (Spain) translations for bpython.
# Copyright (C) 2010 bpython developers
# This file is distributed under the same license as the bpython project.
# Claudia Medde, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: bpython 0.9.7\n"
"Report-Msgid-Bugs-To: http://github.com/bpython/bpython/issues\n"
"POT-Creation-Date: 2021-10-12 21:58+0200\n"
"PO-Revision-Date: 2020-10-29 12:22+0100\n"
"Last-Translator: Sebastian Ramacher \n"
"Language: es_ES\n"
"Language-Team: bpython developers\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: bpython/args.py:63
msgid "{} version {} on top of Python {} {}"
msgstr ""
#: bpython/args.py:72
msgid "{} See AUTHORS.rst for details."
msgstr ""
#: bpython/args.py:116
#, python-format
msgid ""
"Usage: %(prog)s [options] [file [args]]\n"
"NOTE: If bpython sees an argument it does not know, execution falls back "
"to the regular Python interpreter."
msgstr ""
#: bpython/args.py:127
msgid "Use CONFIG instead of default config file."
msgstr ""
#: bpython/args.py:133
msgid "Drop to bpython shell after running file instead of exiting."
msgstr ""
#: bpython/args.py:139
msgid "Don't flush the output to stdout."
msgstr ""
#: bpython/args.py:145
msgid "Print version and exit."
msgstr ""
#: bpython/args.py:152
msgid "Set log level for logging"
msgstr ""
#: bpython/args.py:157
msgid "Log output file"
msgstr ""
#: bpython/args.py:168
msgid "File to execute and additional arguments passed on to the executed script."
msgstr ""
#: bpython/cli.py:320 bpython/curtsiesfrontend/interaction.py:107
#: bpython/urwid.py:539
msgid "y"
msgstr "s"
#: bpython/cli.py:320 bpython/urwid.py:539
msgid "yes"
msgstr "si"
#: bpython/cli.py:1696
msgid "Rewind"
msgstr ""
#: bpython/cli.py:1697
msgid "Save"
msgstr ""
#: bpython/cli.py:1698
msgid "Pastebin"
msgstr ""
#: bpython/cli.py:1699
msgid "Pager"
msgstr ""
#: bpython/cli.py:1700
msgid "Show Source"
msgstr ""
#: bpython/cli.py:1947
msgid ""
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsies.py:201
msgid "start by pasting lines of a file into session"
msgstr ""
#: bpython/curtsies.py:207
msgid "curtsies arguments"
msgstr ""
#: bpython/curtsies.py:208
msgid "Additional arguments specific to the curtsies-based REPL."
msgstr ""
#: bpython/history.py:250
#, python-format
msgid "Error occurred while writing to file %s (%s)"
msgstr ""
#: bpython/paste.py:85
msgid "Helper program not found."
msgstr ""
#: bpython/paste.py:87
msgid "Helper program could not be run."
msgstr ""
#: bpython/paste.py:93
#, python-format
msgid "Helper program returned non-zero exit status %d."
msgstr ""
#: bpython/paste.py:98
msgid "No output from helper program."
msgstr ""
#: bpython/paste.py:105
msgid "Failed to recognize the helper program's output as an URL."
msgstr ""
#: bpython/repl.py:644
msgid "Nothing to get source of"
msgstr ""
#: bpython/repl.py:649
#, python-format
msgid "Cannot get source: %s"
msgstr ""
#: bpython/repl.py:654
#, python-format
msgid "Cannot access source of %r"
msgstr ""
#: bpython/repl.py:656
#, python-format
msgid "No source code found for %s"
msgstr ""
#: bpython/repl.py:801
msgid "Save to file (Esc to cancel): "
msgstr ""
#: bpython/repl.py:803 bpython/repl.py:806 bpython/repl.py:830
msgid "Save cancelled."
msgstr ""
#: bpython/repl.py:817
#, python-format
msgid "%s already exists. Do you want to (c)ancel, (o)verwrite or (a)ppend? "
msgstr ""
#: bpython/repl.py:825
msgid "overwrite"
msgstr ""
#: bpython/repl.py:827
msgid "append"
msgstr ""
#: bpython/repl.py:839 bpython/repl.py:1143
#, python-format
msgid "Error writing file '%s': %s"
msgstr ""
#: bpython/repl.py:841
#, python-format
msgid "Saved to %s."
msgstr ""
#: bpython/repl.py:847
msgid "No clipboard available."
msgstr ""
#: bpython/repl.py:854
msgid "Could not copy to clipboard."
msgstr ""
#: bpython/repl.py:856
msgid "Copied content to clipboard."
msgstr ""
#: bpython/repl.py:865
msgid "Pastebin buffer? (y/N) "
msgstr ""
#: bpython/repl.py:867
msgid "Pastebin aborted."
msgstr ""
#: bpython/repl.py:875
#, python-format
msgid "Duplicate pastebin. Previous URL: %s. Removal URL: %s"
msgstr ""
#: bpython/repl.py:881
msgid "Posting data to pastebin..."
msgstr ""
#: bpython/repl.py:885
#, python-format
msgid "Upload failed: %s"
msgstr ""
#: bpython/repl.py:894
#, python-format
msgid "Pastebin URL: %s - Removal URL: %s"
msgstr ""
#: bpython/repl.py:899
#, python-format
msgid "Pastebin URL: %s"
msgstr ""
#: bpython/repl.py:937
#, python-format
msgid "Undo how many lines? (Undo will take up to ~%.1f seconds) [1]"
msgstr ""
#: bpython/repl.py:945 bpython/repl.py:949
msgid "Undo canceled"
msgstr ""
#: bpython/repl.py:952
#, python-format
msgid "Undoing %d line... (est. %.1f seconds)"
msgid_plural "Undoing %d lines... (est. %.1f seconds)"
msgstr[0] ""
msgstr[1] ""
#: bpython/repl.py:1128
msgid "Config file does not exist - create new from default? (y/N)"
msgstr ""
#: bpython/repl.py:1153
msgid "bpython config file edited. Restart bpython for changes to take effect."
msgstr ""
#: bpython/repl.py:1158
#, python-format
msgid "Error editing config file: %s"
msgstr ""
#: bpython/urwid.py:606
#, python-format
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
msgstr ""
" <%s> Rewind <%s> Salva <%s> Pastebin <%s> Pager <%s> Mostra el "
"código fuente"
#: bpython/urwid.py:1116
msgid "Run twisted reactor."
msgstr ""
#: bpython/urwid.py:1121
msgid "Select specific reactor (see --help-reactors). Implies --twisted."
msgstr ""
#: bpython/urwid.py:1129
msgid "List available reactors for -r."
msgstr ""
#: bpython/urwid.py:1134
msgid ""
"twistd plugin to run (use twistd for a list). Use \"--\" to pass further "
"options to the plugin."
msgstr ""
#: bpython/urwid.py:1143
msgid "Port to run an eval server on (forces Twisted)."
msgstr ""
#: bpython/urwid.py:1337
msgid ""
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:339
msgid "Welcome to bpython!"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:341
#, python-format
msgid "Press <%s> for help."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:681
#, python-format
msgid "Executing PYTHONSTARTUP failed: %s"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:698
#, python-format
msgid "Reloaded at %s because %s modified."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1008
msgid "Session not reevaluated because it was not edited"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1023
msgid "Session not reevaluated because saved file was blank"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1033
msgid "Session edited and reevaluated"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1044
#, python-format
msgid "Reloaded at %s by user."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1050
msgid "Auto-reloading deactivated."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1055
msgid "Auto-reloading active, watching for file changes..."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1061
msgid "Auto-reloading not available because watchdog not installed."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:2011
msgid ""
"\n"
"Thanks for using bpython!\n"
"\n"
"See http://bpython-interpreter.org/ for more information and http://docs"
".bpython-interpreter.org/ for docs.\n"
"Please report issues at https://github.com/bpython/bpython/issues\n"
"\n"
"Features:\n"
"Try using undo ({config.undo_key})!\n"
"Edit the current line ({config.edit_current_block_key}) or the entire "
"session ({config.external_editor_key}) in an external editor. (currently "
"{config.editor})\n"
"Save sessions ({config.save_key}) or post them to pastebins "
"({config.pastebin_key})! Current pastebin helper: "
"{config.pastebin_helper}\n"
"Reload all modules and rerun session ({config.reimport_key}) to test out "
"changes to a module.\n"
"Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute "
"the current session when a module you've imported is modified.\n"
"\n"
"bpython -i your_script.py runs a file in interactive mode\n"
"bpython -t your_script.py pastes the contents of a file into the session\n"
"\n"
"A config file at {config.config_path} customizes keys and behavior of "
"bpython.\n"
"You can also set which pastebin helper and which external editor to use.\n"
"See {example_config_url} for an example config file.\n"
"Press {config.edit_config_key} to edit this config file.\n"
msgstr ""
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/bpython/translations/fr_FR/0000755000175000017500000000000014361765332017114 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.146035
bpython-0.24/bpython/translations/fr_FR/LC_MESSAGES/0000755000175000017500000000000014361765332020701 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/translations/fr_FR/LC_MESSAGES/bpython.po0000644000175000017500000002443014254577175022736 0ustar00useruser# French (France) translations for bpython.
# Copyright (C) 2010 bpython developers
# This file is distributed under the same license as the bpython project.
#
msgid ""
msgstr ""
"Project-Id-Version: bpython 0.13-442\n"
"Report-Msgid-Bugs-To: http://github.com/bpython/bpython/issues\n"
"POT-Creation-Date: 2021-10-12 21:58+0200\n"
"PO-Revision-Date: 2020-10-29 12:20+0100\n"
"Last-Translator: Sebastian Ramacher \n"
"Language: fr_FR\n"
"Language-Team: bpython developers\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: bpython/args.py:63
msgid "{} version {} on top of Python {} {}"
msgstr ""
#: bpython/args.py:72
msgid "{} See AUTHORS.rst for details."
msgstr ""
#: bpython/args.py:116
#, python-format
msgid ""
"Usage: %(prog)s [options] [file [args]]\n"
"NOTE: If bpython sees an argument it does not know, execution falls back "
"to the regular Python interpreter."
msgstr ""
"Utilisation: %(prog)s [options] [fichier [arguments]]\n"
"NOTE: Si bpython ne reconnaît pas un des arguments fournis, "
"l'interpréteur Python classique sera lancé"
#: bpython/args.py:127
msgid "Use CONFIG instead of default config file."
msgstr "Utiliser CONFIG à la place du fichier de configuration par défaut."
#: bpython/args.py:133
msgid "Drop to bpython shell after running file instead of exiting."
msgstr ""
"Aller dans le shell bpython après l'exécution du fichier au lieu de "
"quitter."
#: bpython/args.py:139
msgid "Don't flush the output to stdout."
msgstr "Ne pas purger la sortie vers stdout."
#: bpython/args.py:145
msgid "Print version and exit."
msgstr "Afficher la version et quitter."
#: bpython/args.py:152
msgid "Set log level for logging"
msgstr ""
#: bpython/args.py:157
msgid "Log output file"
msgstr ""
#: bpython/args.py:168
msgid "File to execute and additional arguments passed on to the executed script."
msgstr ""
#: bpython/cli.py:320 bpython/curtsiesfrontend/interaction.py:107
#: bpython/urwid.py:539
msgid "y"
msgstr "o"
#: bpython/cli.py:320 bpython/urwid.py:539
msgid "yes"
msgstr "oui"
#: bpython/cli.py:1696
msgid "Rewind"
msgstr "Rembobiner"
#: bpython/cli.py:1697
msgid "Save"
msgstr "Sauvegarder"
#: bpython/cli.py:1698
msgid "Pastebin"
msgstr ""
#: bpython/cli.py:1699
msgid "Pager"
msgstr ""
#: bpython/cli.py:1700
msgid "Show Source"
msgstr "Montrer le code source"
#: bpython/cli.py:1947
msgid ""
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsies.py:201
msgid "start by pasting lines of a file into session"
msgstr ""
#: bpython/curtsies.py:207
msgid "curtsies arguments"
msgstr ""
#: bpython/curtsies.py:208
msgid "Additional arguments specific to the curtsies-based REPL."
msgstr ""
#: bpython/history.py:250
#, python-format
msgid "Error occurred while writing to file %s (%s)"
msgstr "Une erreur s'est produite pendant l'écriture du fichier %s (%s)"
#: bpython/paste.py:85
msgid "Helper program not found."
msgstr "programme externe non trouvé."
#: bpython/paste.py:87
msgid "Helper program could not be run."
msgstr "impossible de lancer le programme externe."
#: bpython/paste.py:93
#, python-format
msgid "Helper program returned non-zero exit status %d."
msgstr "le programme externe a renvoyé un statut de sortie différent de zéro %d."
#: bpython/paste.py:98
msgid "No output from helper program."
msgstr "pas de sortie du programme externe."
#: bpython/paste.py:105
msgid "Failed to recognize the helper program's output as an URL."
msgstr "la sortie du programme externe ne correspond pas à une URL."
#: bpython/repl.py:644
msgid "Nothing to get source of"
msgstr ""
#: bpython/repl.py:649
#, python-format
msgid "Cannot get source: %s"
msgstr "Impossible de récupérer le source: %s"
#: bpython/repl.py:654
#, python-format
msgid "Cannot access source of %r"
msgstr "Impossible d'accéder au source de %r"
#: bpython/repl.py:656
#, python-format
msgid "No source code found for %s"
msgstr "Pas de code source trouvé pour %s"
#: bpython/repl.py:801
msgid "Save to file (Esc to cancel): "
msgstr ""
#: bpython/repl.py:803 bpython/repl.py:806 bpython/repl.py:830
msgid "Save cancelled."
msgstr ""
#: bpython/repl.py:817
#, python-format
msgid "%s already exists. Do you want to (c)ancel, (o)verwrite or (a)ppend? "
msgstr ""
#: bpython/repl.py:825
msgid "overwrite"
msgstr ""
#: bpython/repl.py:827
msgid "append"
msgstr ""
#: bpython/repl.py:839 bpython/repl.py:1143
#, python-format
msgid "Error writing file '%s': %s"
msgstr "Une erreur s'est produite pendant l'écriture du fichier '%s': %s"
#: bpython/repl.py:841
#, python-format
msgid "Saved to %s."
msgstr ""
#: bpython/repl.py:847
msgid "No clipboard available."
msgstr "Pas de presse-papier disponible."
#: bpython/repl.py:854
msgid "Could not copy to clipboard."
msgstr "Impossible de copier vers le presse-papier."
#: bpython/repl.py:856
msgid "Copied content to clipboard."
msgstr "Contenu copié vers le presse-papier."
#: bpython/repl.py:865
msgid "Pastebin buffer? (y/N) "
msgstr "Tampon Pastebin ? (o/N) "
#: bpython/repl.py:867
msgid "Pastebin aborted."
msgstr "Pastebin abandonné."
#: bpython/repl.py:875
#, python-format
msgid "Duplicate pastebin. Previous URL: %s. Removal URL: %s"
msgstr "Pastebin dupliqué. URL précédente: %s. URL de suppression: %s"
#: bpython/repl.py:881
msgid "Posting data to pastebin..."
msgstr "Envoi des donnés à pastebin..."
#: bpython/repl.py:885
#, python-format
msgid "Upload failed: %s"
msgstr "Echec du téléchargement: %s"
#: bpython/repl.py:894
#, python-format
msgid "Pastebin URL: %s - Removal URL: %s"
msgstr "URL Pastebin: %s - URL de suppression: %s"
#: bpython/repl.py:899
#, python-format
msgid "Pastebin URL: %s"
msgstr "URL Pastebin: %s"
#: bpython/repl.py:937
#, python-format
msgid "Undo how many lines? (Undo will take up to ~%.1f seconds) [1]"
msgstr ""
#: bpython/repl.py:945 bpython/repl.py:949
msgid "Undo canceled"
msgstr ""
#: bpython/repl.py:952
#, python-format
msgid "Undoing %d line... (est. %.1f seconds)"
msgid_plural "Undoing %d lines... (est. %.1f seconds)"
msgstr[0] ""
msgstr[1] ""
#: bpython/repl.py:1128
msgid "Config file does not exist - create new from default? (y/N)"
msgstr "Le fichier de configuration n'existe pas - en créér un par défaut? (o/N)"
#: bpython/repl.py:1153
msgid "bpython config file edited. Restart bpython for changes to take effect."
msgstr ""
#: bpython/repl.py:1158
#, python-format
msgid "Error editing config file: %s"
msgstr ""
#: bpython/urwid.py:606
#, python-format
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
msgstr ""
" <%s> Rebobiner <%s> Sauvegarder <%s> Pastebin <%s> Pager <%s> "
"Montrer Source "
#: bpython/urwid.py:1116
msgid "Run twisted reactor."
msgstr "Lancer le reactor twisted."
#: bpython/urwid.py:1121
msgid "Select specific reactor (see --help-reactors). Implies --twisted."
msgstr "Choisir un reactor spécifique (voir --help-reactors). Nécessite --twisted."
#: bpython/urwid.py:1129
msgid "List available reactors for -r."
msgstr "Lister les reactors disponibles pour -r."
#: bpython/urwid.py:1134
msgid ""
"twistd plugin to run (use twistd for a list). Use \"--\" to pass further "
"options to the plugin."
msgstr ""
"plugin twistd à lancer (utiliser twistd pour une list). Utiliser \"--\" "
"pour donner plus d'options au plugin."
#: bpython/urwid.py:1143
msgid "Port to run an eval server on (forces Twisted)."
msgstr "Port pour lancer un server eval (force Twisted)."
#: bpython/urwid.py:1337
msgid ""
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:339
msgid "Welcome to bpython!"
msgstr "Bienvenue dans bpython!"
#: bpython/curtsiesfrontend/repl.py:341
#, python-format
msgid "Press <%s> for help."
msgstr "Appuyer sur <%s> pour de l'aide."
#: bpython/curtsiesfrontend/repl.py:681
#, python-format
msgid "Executing PYTHONSTARTUP failed: %s"
msgstr "L'exécution de PYTHONSTARTUP a échoué: %s"
#: bpython/curtsiesfrontend/repl.py:698
#, python-format
msgid "Reloaded at %s because %s modified."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1008
msgid "Session not reevaluated because it was not edited"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1023
msgid "Session not reevaluated because saved file was blank"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1033
msgid "Session edited and reevaluated"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1044
#, python-format
msgid "Reloaded at %s by user."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1050
msgid "Auto-reloading deactivated."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1055
msgid "Auto-reloading active, watching for file changes..."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1061
msgid "Auto-reloading not available because watchdog not installed."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:2011
msgid ""
"\n"
"Thanks for using bpython!\n"
"\n"
"See http://bpython-interpreter.org/ for more information and http://docs"
".bpython-interpreter.org/ for docs.\n"
"Please report issues at https://github.com/bpython/bpython/issues\n"
"\n"
"Features:\n"
"Try using undo ({config.undo_key})!\n"
"Edit the current line ({config.edit_current_block_key}) or the entire "
"session ({config.external_editor_key}) in an external editor. (currently "
"{config.editor})\n"
"Save sessions ({config.save_key}) or post them to pastebins "
"({config.pastebin_key})! Current pastebin helper: "
"{config.pastebin_helper}\n"
"Reload all modules and rerun session ({config.reimport_key}) to test out "
"changes to a module.\n"
"Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute "
"the current session when a module you've imported is modified.\n"
"\n"
"bpython -i your_script.py runs a file in interactive mode\n"
"bpython -t your_script.py pastes the contents of a file into the session\n"
"\n"
"A config file at {config.config_path} customizes keys and behavior of "
"bpython.\n"
"You can also set which pastebin helper and which external editor to use.\n"
"See {example_config_url} for an example config file.\n"
"Press {config.edit_config_key} to edit this config file.\n"
msgstr ""
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/bpython/translations/it_IT/0000755000175000017500000000000014361765332017126 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.146035
bpython-0.24/bpython/translations/it_IT/LC_MESSAGES/0000755000175000017500000000000014361765332020713 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/translations/it_IT/LC_MESSAGES/bpython.po0000644000175000017500000002123614254577175022751 0ustar00useruser# Italian (Italy) translations for bpython.
# Copyright (C) 2010 bpython developers
# This file is distributed under the same license as the bpython project.
# Michele Orrù , 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: bpython 0.9.7\n"
"Report-Msgid-Bugs-To: http://github.com/bpython/bpython/issues\n"
"POT-Creation-Date: 2021-10-12 21:58+0200\n"
"PO-Revision-Date: 2015-02-02 00:34+0100\n"
"Last-Translator: Sebastian Ramacher \n"
"Language: it_IT\n"
"Language-Team: Michele Orrù\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: bpython/args.py:63
msgid "{} version {} on top of Python {} {}"
msgstr ""
#: bpython/args.py:72
msgid "{} See AUTHORS.rst for details."
msgstr ""
#: bpython/args.py:116
#, python-format
msgid ""
"Usage: %(prog)s [options] [file [args]]\n"
"NOTE: If bpython sees an argument it does not know, execution falls back "
"to the regular Python interpreter."
msgstr ""
#: bpython/args.py:127
msgid "Use CONFIG instead of default config file."
msgstr ""
#: bpython/args.py:133
msgid "Drop to bpython shell after running file instead of exiting."
msgstr ""
#: bpython/args.py:139
msgid "Don't flush the output to stdout."
msgstr ""
#: bpython/args.py:145
msgid "Print version and exit."
msgstr ""
#: bpython/args.py:152
msgid "Set log level for logging"
msgstr ""
#: bpython/args.py:157
msgid "Log output file"
msgstr ""
#: bpython/args.py:168
msgid "File to execute and additional arguments passed on to the executed script."
msgstr ""
#: bpython/cli.py:320 bpython/curtsiesfrontend/interaction.py:107
#: bpython/urwid.py:539
msgid "y"
msgstr "s"
#: bpython/cli.py:320 bpython/urwid.py:539
msgid "yes"
msgstr "si"
#: bpython/cli.py:1696
msgid "Rewind"
msgstr ""
#: bpython/cli.py:1697
msgid "Save"
msgstr ""
#: bpython/cli.py:1698
msgid "Pastebin"
msgstr ""
#: bpython/cli.py:1699
msgid "Pager"
msgstr ""
#: bpython/cli.py:1700
msgid "Show Source"
msgstr ""
#: bpython/cli.py:1947
msgid ""
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsies.py:201
msgid "start by pasting lines of a file into session"
msgstr ""
#: bpython/curtsies.py:207
msgid "curtsies arguments"
msgstr ""
#: bpython/curtsies.py:208
msgid "Additional arguments specific to the curtsies-based REPL."
msgstr ""
#: bpython/history.py:250
#, python-format
msgid "Error occurred while writing to file %s (%s)"
msgstr ""
#: bpython/paste.py:85
msgid "Helper program not found."
msgstr ""
#: bpython/paste.py:87
msgid "Helper program could not be run."
msgstr ""
#: bpython/paste.py:93
#, python-format
msgid "Helper program returned non-zero exit status %d."
msgstr ""
#: bpython/paste.py:98
msgid "No output from helper program."
msgstr ""
#: bpython/paste.py:105
msgid "Failed to recognize the helper program's output as an URL."
msgstr ""
#: bpython/repl.py:644
msgid "Nothing to get source of"
msgstr ""
#: bpython/repl.py:649
#, python-format
msgid "Cannot get source: %s"
msgstr ""
#: bpython/repl.py:654
#, python-format
msgid "Cannot access source of %r"
msgstr ""
#: bpython/repl.py:656
#, python-format
msgid "No source code found for %s"
msgstr ""
#: bpython/repl.py:801
msgid "Save to file (Esc to cancel): "
msgstr ""
#: bpython/repl.py:803 bpython/repl.py:806 bpython/repl.py:830
msgid "Save cancelled."
msgstr ""
#: bpython/repl.py:817
#, python-format
msgid "%s already exists. Do you want to (c)ancel, (o)verwrite or (a)ppend? "
msgstr ""
#: bpython/repl.py:825
msgid "overwrite"
msgstr ""
#: bpython/repl.py:827
msgid "append"
msgstr ""
#: bpython/repl.py:839 bpython/repl.py:1143
#, python-format
msgid "Error writing file '%s': %s"
msgstr ""
#: bpython/repl.py:841
#, python-format
msgid "Saved to %s."
msgstr ""
#: bpython/repl.py:847
msgid "No clipboard available."
msgstr ""
#: bpython/repl.py:854
msgid "Could not copy to clipboard."
msgstr ""
#: bpython/repl.py:856
msgid "Copied content to clipboard."
msgstr ""
#: bpython/repl.py:865
msgid "Pastebin buffer? (y/N) "
msgstr ""
#: bpython/repl.py:867
msgid "Pastebin aborted."
msgstr ""
#: bpython/repl.py:875
#, python-format
msgid "Duplicate pastebin. Previous URL: %s. Removal URL: %s"
msgstr ""
#: bpython/repl.py:881
msgid "Posting data to pastebin..."
msgstr ""
#: bpython/repl.py:885
#, python-format
msgid "Upload failed: %s"
msgstr ""
#: bpython/repl.py:894
#, python-format
msgid "Pastebin URL: %s - Removal URL: %s"
msgstr ""
#: bpython/repl.py:899
#, python-format
msgid "Pastebin URL: %s"
msgstr ""
#: bpython/repl.py:937
#, python-format
msgid "Undo how many lines? (Undo will take up to ~%.1f seconds) [1]"
msgstr ""
#: bpython/repl.py:945 bpython/repl.py:949
msgid "Undo canceled"
msgstr ""
#: bpython/repl.py:952
#, python-format
msgid "Undoing %d line... (est. %.1f seconds)"
msgid_plural "Undoing %d lines... (est. %.1f seconds)"
msgstr[0] ""
msgstr[1] ""
#: bpython/repl.py:1128
msgid "Config file does not exist - create new from default? (y/N)"
msgstr ""
#: bpython/repl.py:1153
msgid "bpython config file edited. Restart bpython for changes to take effect."
msgstr ""
#: bpython/repl.py:1158
#, python-format
msgid "Error editing config file: %s"
msgstr ""
#: bpython/urwid.py:606
#, python-format
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
msgstr " <%s> Rewind <%s> Salva <%s> Pastebin <%s> Pager <%s> Mostra Sorgente"
#: bpython/urwid.py:1116
msgid "Run twisted reactor."
msgstr ""
#: bpython/urwid.py:1121
msgid "Select specific reactor (see --help-reactors). Implies --twisted."
msgstr ""
#: bpython/urwid.py:1129
msgid "List available reactors for -r."
msgstr ""
#: bpython/urwid.py:1134
msgid ""
"twistd plugin to run (use twistd for a list). Use \"--\" to pass further "
"options to the plugin."
msgstr ""
#: bpython/urwid.py:1143
msgid "Port to run an eval server on (forces Twisted)."
msgstr ""
#: bpython/urwid.py:1337
msgid ""
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:339
msgid "Welcome to bpython!"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:341
#, python-format
msgid "Press <%s> for help."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:681
#, python-format
msgid "Executing PYTHONSTARTUP failed: %s"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:698
#, python-format
msgid "Reloaded at %s because %s modified."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1008
msgid "Session not reevaluated because it was not edited"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1023
msgid "Session not reevaluated because saved file was blank"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1033
msgid "Session edited and reevaluated"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1044
#, python-format
msgid "Reloaded at %s by user."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1050
msgid "Auto-reloading deactivated."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1055
msgid "Auto-reloading active, watching for file changes..."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1061
msgid "Auto-reloading not available because watchdog not installed."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:2011
msgid ""
"\n"
"Thanks for using bpython!\n"
"\n"
"See http://bpython-interpreter.org/ for more information and http://docs"
".bpython-interpreter.org/ for docs.\n"
"Please report issues at https://github.com/bpython/bpython/issues\n"
"\n"
"Features:\n"
"Try using undo ({config.undo_key})!\n"
"Edit the current line ({config.edit_current_block_key}) or the entire "
"session ({config.external_editor_key}) in an external editor. (currently "
"{config.editor})\n"
"Save sessions ({config.save_key}) or post them to pastebins "
"({config.pastebin_key})! Current pastebin helper: "
"{config.pastebin_helper}\n"
"Reload all modules and rerun session ({config.reimport_key}) to test out "
"changes to a module.\n"
"Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute "
"the current session when a module you've imported is modified.\n"
"\n"
"bpython -i your_script.py runs a file in interactive mode\n"
"bpython -t your_script.py pastes the contents of a file into the session\n"
"\n"
"A config file at {config.config_path} customizes keys and behavior of "
"bpython.\n"
"You can also set which pastebin helper and which external editor to use.\n"
"See {example_config_url} for an example config file.\n"
"Press {config.edit_config_key} to edit this config file.\n"
msgstr ""
#~ msgid "Error editing config file."
#~ msgstr ""
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/bpython/translations/nl_NL/0000755000175000017500000000000014361765332017120 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.146035
bpython-0.24/bpython/translations/nl_NL/LC_MESSAGES/0000755000175000017500000000000014361765332020705 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/bpython/translations/nl_NL/LC_MESSAGES/bpython.po0000644000175000017500000002114414254577175022741 0ustar00useruser# Dutch (Netherlands) translations for bpython.
# Copyright (C) 2011 bpython developers
# This file is distributed under the same license as the bpython project.
# Simon de Vlieger, 2011 .
#
msgid ""
msgstr ""
"Project-Id-Version: bpython 0.9.7.1\n"
"Report-Msgid-Bugs-To: http://github.com/bpython/bpython/issues\n"
"POT-Creation-Date: 2021-10-12 21:58+0200\n"
"PO-Revision-Date: 2020-10-29 12:20+0100\n"
"Last-Translator: Sebastian Ramacher \n"
"Language: nl_NL\n"
"Language-Team: bpython developers\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
#: bpython/args.py:63
msgid "{} version {} on top of Python {} {}"
msgstr ""
#: bpython/args.py:72
msgid "{} See AUTHORS.rst for details."
msgstr ""
#: bpython/args.py:116
#, python-format
msgid ""
"Usage: %(prog)s [options] [file [args]]\n"
"NOTE: If bpython sees an argument it does not know, execution falls back "
"to the regular Python interpreter."
msgstr ""
#: bpython/args.py:127
msgid "Use CONFIG instead of default config file."
msgstr ""
#: bpython/args.py:133
msgid "Drop to bpython shell after running file instead of exiting."
msgstr ""
#: bpython/args.py:139
msgid "Don't flush the output to stdout."
msgstr ""
#: bpython/args.py:145
msgid "Print version and exit."
msgstr ""
#: bpython/args.py:152
msgid "Set log level for logging"
msgstr ""
#: bpython/args.py:157
msgid "Log output file"
msgstr ""
#: bpython/args.py:168
msgid "File to execute and additional arguments passed on to the executed script."
msgstr ""
#: bpython/cli.py:320 bpython/curtsiesfrontend/interaction.py:107
#: bpython/urwid.py:539
msgid "y"
msgstr "j"
#: bpython/cli.py:320 bpython/urwid.py:539
msgid "yes"
msgstr "ja"
#: bpython/cli.py:1696
msgid "Rewind"
msgstr ""
#: bpython/cli.py:1697
msgid "Save"
msgstr ""
#: bpython/cli.py:1698
msgid "Pastebin"
msgstr ""
#: bpython/cli.py:1699
msgid "Pager"
msgstr ""
#: bpython/cli.py:1700
msgid "Show Source"
msgstr ""
#: bpython/cli.py:1947
msgid ""
"WARNING: You are using `bpython-cli`, the curses backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsies.py:201
msgid "start by pasting lines of a file into session"
msgstr ""
#: bpython/curtsies.py:207
msgid "curtsies arguments"
msgstr ""
#: bpython/curtsies.py:208
msgid "Additional arguments specific to the curtsies-based REPL."
msgstr ""
#: bpython/history.py:250
#, python-format
msgid "Error occurred while writing to file %s (%s)"
msgstr ""
#: bpython/paste.py:85
msgid "Helper program not found."
msgstr ""
#: bpython/paste.py:87
msgid "Helper program could not be run."
msgstr ""
#: bpython/paste.py:93
#, python-format
msgid "Helper program returned non-zero exit status %d."
msgstr ""
#: bpython/paste.py:98
msgid "No output from helper program."
msgstr ""
#: bpython/paste.py:105
msgid "Failed to recognize the helper program's output as an URL."
msgstr ""
#: bpython/repl.py:644
msgid "Nothing to get source of"
msgstr ""
#: bpython/repl.py:649
#, python-format
msgid "Cannot get source: %s"
msgstr ""
#: bpython/repl.py:654
#, python-format
msgid "Cannot access source of %r"
msgstr ""
#: bpython/repl.py:656
#, python-format
msgid "No source code found for %s"
msgstr ""
#: bpython/repl.py:801
msgid "Save to file (Esc to cancel): "
msgstr ""
#: bpython/repl.py:803 bpython/repl.py:806 bpython/repl.py:830
msgid "Save cancelled."
msgstr ""
#: bpython/repl.py:817
#, python-format
msgid "%s already exists. Do you want to (c)ancel, (o)verwrite or (a)ppend? "
msgstr ""
#: bpython/repl.py:825
msgid "overwrite"
msgstr ""
#: bpython/repl.py:827
msgid "append"
msgstr ""
#: bpython/repl.py:839 bpython/repl.py:1143
#, python-format
msgid "Error writing file '%s': %s"
msgstr ""
#: bpython/repl.py:841
#, python-format
msgid "Saved to %s."
msgstr ""
#: bpython/repl.py:847
msgid "No clipboard available."
msgstr ""
#: bpython/repl.py:854
msgid "Could not copy to clipboard."
msgstr ""
#: bpython/repl.py:856
msgid "Copied content to clipboard."
msgstr ""
#: bpython/repl.py:865
msgid "Pastebin buffer? (y/N) "
msgstr ""
#: bpython/repl.py:867
msgid "Pastebin aborted."
msgstr ""
#: bpython/repl.py:875
#, python-format
msgid "Duplicate pastebin. Previous URL: %s. Removal URL: %s"
msgstr ""
#: bpython/repl.py:881
msgid "Posting data to pastebin..."
msgstr ""
#: bpython/repl.py:885
#, python-format
msgid "Upload failed: %s"
msgstr ""
#: bpython/repl.py:894
#, python-format
msgid "Pastebin URL: %s - Removal URL: %s"
msgstr ""
#: bpython/repl.py:899
#, python-format
msgid "Pastebin URL: %s"
msgstr ""
#: bpython/repl.py:937
#, python-format
msgid "Undo how many lines? (Undo will take up to ~%.1f seconds) [1]"
msgstr ""
#: bpython/repl.py:945 bpython/repl.py:949
msgid "Undo canceled"
msgstr ""
#: bpython/repl.py:952
#, python-format
msgid "Undoing %d line... (est. %.1f seconds)"
msgid_plural "Undoing %d lines... (est. %.1f seconds)"
msgstr[0] ""
msgstr[1] ""
#: bpython/repl.py:1128
msgid "Config file does not exist - create new from default? (y/N)"
msgstr ""
#: bpython/repl.py:1153
msgid "bpython config file edited. Restart bpython for changes to take effect."
msgstr ""
#: bpython/repl.py:1158
#, python-format
msgid "Error editing config file: %s"
msgstr ""
#: bpython/urwid.py:606
#, python-format
msgid " <%s> Rewind <%s> Save <%s> Pastebin <%s> Pager <%s> Show Source "
msgstr " <%s> Rewind <%s> Opslaan <%s> Pastebin <%s> Pager <%s> Toon broncode"
#: bpython/urwid.py:1116
msgid "Run twisted reactor."
msgstr ""
#: bpython/urwid.py:1121
msgid "Select specific reactor (see --help-reactors). Implies --twisted."
msgstr ""
#: bpython/urwid.py:1129
msgid "List available reactors for -r."
msgstr ""
#: bpython/urwid.py:1134
msgid ""
"twistd plugin to run (use twistd for a list). Use \"--\" to pass further "
"options to the plugin."
msgstr ""
#: bpython/urwid.py:1143
msgid "Port to run an eval server on (forces Twisted)."
msgstr ""
#: bpython/urwid.py:1337
msgid ""
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. "
"This backend has been deprecated in version 0.19 and might disappear in a"
" future version."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:339
msgid "Welcome to bpython!"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:341
#, python-format
msgid "Press <%s> for help."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:681
#, python-format
msgid "Executing PYTHONSTARTUP failed: %s"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:698
#, python-format
msgid "Reloaded at %s because %s modified."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1008
msgid "Session not reevaluated because it was not edited"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1023
msgid "Session not reevaluated because saved file was blank"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1033
msgid "Session edited and reevaluated"
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1044
#, python-format
msgid "Reloaded at %s by user."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1050
msgid "Auto-reloading deactivated."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1055
msgid "Auto-reloading active, watching for file changes..."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:1061
msgid "Auto-reloading not available because watchdog not installed."
msgstr ""
#: bpython/curtsiesfrontend/repl.py:2011
msgid ""
"\n"
"Thanks for using bpython!\n"
"\n"
"See http://bpython-interpreter.org/ for more information and http://docs"
".bpython-interpreter.org/ for docs.\n"
"Please report issues at https://github.com/bpython/bpython/issues\n"
"\n"
"Features:\n"
"Try using undo ({config.undo_key})!\n"
"Edit the current line ({config.edit_current_block_key}) or the entire "
"session ({config.external_editor_key}) in an external editor. (currently "
"{config.editor})\n"
"Save sessions ({config.save_key}) or post them to pastebins "
"({config.pastebin_key})! Current pastebin helper: "
"{config.pastebin_helper}\n"
"Reload all modules and rerun session ({config.reimport_key}) to test out "
"changes to a module.\n"
"Toggle auto-reload mode ({config.toggle_file_watch_key}) to re-execute "
"the current session when a module you've imported is modified.\n"
"\n"
"bpython -i your_script.py runs a file in interactive mode\n"
"bpython -t your_script.py pastes the contents of a file into the session\n"
"\n"
"A config file at {config.config_path} customizes keys and behavior of "
"bpython.\n"
"You can also set which pastebin helper and which external editor to use.\n"
"See {example_config_url} for an example config file.\n"
"Press {config.edit_config_key} to edit this config file.\n"
msgstr ""
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046093.0
bpython-0.24/bpython/urwid.py0000644000175000017500000014244114361765215015107 0ustar00useruser# The MIT License
#
# Copyright (c) 2010-2011 Marien Zwart
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# This whole file typing TODO
# type: ignore
"""bpython backend based on Urwid.
Based on Urwid 0.9.9.
This steals many things from bpython's "cli" backend.
This is still *VERY* rough.
"""
import sys
import os
import time
import locale
import signal
import urwid
from typing import Optional
from . import args as bpargs, repl, translations
from .formatter import theme_map
from .translations import _
from .keys import urwid_key_dispatch as key_dispatch
# Urwid colors are:
# 'black', 'dark red', 'dark green', 'brown', 'dark blue',
# 'dark magenta', 'dark cyan', 'light gray', 'dark gray',
# 'light red', 'light green', 'yellow', 'light blue',
# 'light magenta', 'light cyan', 'white'
# and bpython has:
# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default
COLORMAP = {
"k": "black",
"r": "dark red", # or light red?
"g": "dark green", # or light green?
"y": "yellow",
"b": "dark blue", # or light blue?
"m": "dark magenta", # or light magenta?
"c": "dark cyan", # or light cyan?
"w": "white",
"d": "default",
}
try:
from twisted.internet import protocol
from twisted.protocols import basic
except ImportError:
pass
else:
class EvalProtocol(basic.LineOnlyReceiver):
delimiter = "\n"
def __init__(self, myrepl):
self.repl = myrepl
def lineReceived(self, line):
# HACK!
# TODO: deal with encoding issues here...
self.repl.main_loop.process_input(line)
self.repl.main_loop.process_input(["enter"])
class EvalFactory(protocol.ServerFactory):
def __init__(self, myrepl):
self.repl = myrepl
def buildProtocol(self, addr):
return EvalProtocol(self.repl)
# If Twisted is not available urwid has no TwistedEventLoop attribute.
# Code below will try to import reactor before using TwistedEventLoop.
# I assume TwistedEventLoop will be available if that import succeeds.
if urwid.VERSION < (1, 0, 0) and hasattr(urwid, "TwistedEventLoop"):
class TwistedEventLoop(urwid.TwistedEventLoop):
"""TwistedEventLoop modified to properly stop the reactor.
urwid 0.9.9 and 0.9.9.1 crash the reactor on ExitMainLoop instead
of stopping it. One obvious way this breaks is if anything used
the reactor's thread pool: that thread pool is not shut down if
the reactor is not stopped, which means python hangs on exit
(joining the non-daemon threadpool threads that never exit). And
the default resolver is the ThreadedResolver, so if we looked up
any names we hang on exit. That is bad enough that we hack up
urwid a bit here to exit properly.
"""
def handle_exit(self, f):
def wrapper(*args, **kwargs):
try:
return f(*args, **kwargs)
except urwid.ExitMainLoop:
# This is our change.
self.reactor.stop()
except:
# This is the same as in urwid.
# We are obviously not supposed to ever hit this.
print(sys.exc_info())
self._exc_info = sys.exc_info()
self.reactor.crash()
return wrapper
else:
TwistedEventLoop = getattr(urwid, "TwistedEventLoop", None)
class StatusbarEdit(urwid.Edit):
"""Wrapper around urwid.Edit used for the prompt in Statusbar.
This class only adds a single signal that is emitted if the user presses
Enter."""
signals = urwid.Edit.signals + ["prompt_enter"]
def __init__(self, *args, **kwargs):
self.single = False
super().__init__(*args, **kwargs)
def keypress(self, size, key):
if self.single:
urwid.emit_signal(self, "prompt_enter", self, key)
elif key == "enter":
urwid.emit_signal(self, "prompt_enter", self, self.get_edit_text())
else:
return super().keypress(size, key)
urwid.register_signal(StatusbarEdit, "prompt_enter")
class Statusbar:
"""Statusbar object, ripped off from bpython.cli.
This class provides the status bar at the bottom of the screen.
It has message() and prompt() methods for user interactivity, as
well as settext() and clear() methods for changing its appearance.
The check() method needs to be called repeatedly if the statusbar is
going to be aware of when it should update its display after a message()
has been called (it'll display for a couple of seconds and then disappear).
It should be called as:
foo = Statusbar('Initial text to display')
or, for a blank statusbar:
foo = Statusbar()
The "widget" attribute is an urwid widget.
"""
signals = ["prompt_result"]
def __init__(self, config, s=None, main_loop=None):
self.config = config
self.timer = None
self.main_loop = main_loop
self.s = s or ""
self.text = urwid.Text(("main", self.s))
# use wrap mode 'clip' to just cut off at the end of line
self.text.set_wrap_mode("clip")
self.edit = StatusbarEdit(("main", ""))
urwid.connect_signal(self.edit, "prompt_enter", self._on_prompt_enter)
self.widget = urwid.Columns([self.text, self.edit])
def _check(self, callback, userdata=None):
"""This is the method is called from the timer to reset the status bar."""
self.timer = None
self.settext(self.s)
def message(self, s, n=3):
"""Display a message for a short n seconds on the statusbar and return
it to its original state."""
self.settext(s)
self.timer = self.main_loop.set_alarm_in(n, self._check)
def _reset_timer(self):
"""Reset the timer from message."""
if self.timer is not None:
self.main_loop.remove_alarm(self.timer)
self.timer = None
def prompt(self, s=None, single=False):
"""Prompt the user for some input (with the optional prompt 's'). After
the user hit enter the signal 'prompt_result' will be emitted and the
status bar will be reset. If single is True, the first keypress will be
returned."""
self._reset_timer()
self.edit.single = single
self.edit.set_caption(("main", s or "?"))
self.edit.set_edit_text("")
# hide the text and display the edit widget
if self.edit not in self.widget.widget_list:
self.widget.widget_list.append(self.edit)
if self.text in self.widget.widget_list:
self.widget.widget_list.remove(self.text)
self.widget.set_focus_column(0)
def settext(self, s, permanent=False):
"""Set the text on the status bar to a new value. If permanent is True,
the new value will be permanent. If that status bar is in prompt mode,
the prompt will be aborted."""
self._reset_timer()
# hide the edit and display the text widget
if self.edit in self.widget.widget_list:
self.widget.widget_list.remove(self.edit)
if self.text not in self.widget.widget_list:
self.widget.widget_list.append(self.text)
self.text.set_text(("main", s))
if permanent:
self.s = s
def clear(self):
"""Clear the status bar."""
self.settext("")
def _on_prompt_enter(self, edit, new_text):
"""Reset the statusbar and pass the input from the prompt to the caller
via 'prompt_result'."""
self.settext(self.s)
urwid.emit_signal(self, "prompt_result", new_text)
urwid.register_signal(Statusbar, "prompt_result")
def decoding_input_filter(keys, raw):
"""Input filter for urwid which decodes each key with the locale's
preferred encoding.'"""
encoding = locale.getpreferredencoding()
converted_keys = list()
for key in keys:
if isinstance(key, str):
converted_keys.append(key.decode(encoding))
else:
converted_keys.append(key)
return converted_keys
def format_tokens(tokensource):
for token, text in tokensource:
if text == "\n":
continue
# TODO: something about inversing Parenthesis
while token not in theme_map:
token = token.parent
yield (theme_map[token], text)
class BPythonEdit(urwid.Edit):
"""Customized editor *very* tightly interwoven with URWIDRepl.
Changes include:
- The edit text supports markup, not just the caption.
This works by calling set_edit_markup from the change event
as well as whenever markup changes while text does not.
- The widget can be made readonly, which currently just means
it is no longer selectable and stops drawing the cursor.
This is currently a one-way operation, but that is just because
I only need and test the readwrite->readonly transition.
- move_cursor_to_coords is ignored
(except for internal calls from keypress or mouse_event).
- arrow up/down are ignored.
- an "edit-pos-changed" signal is emitted when edit_pos changes.
"""
signals = ["edit-pos-changed"]
def __init__(self, config, *args, **kwargs):
self._bpy_text = ""
self._bpy_attr = []
self._bpy_selectable = True
self._bpy_may_move_cursor = False
self.config = config
self.tab_length = config.tab_length
super().__init__(*args, **kwargs)
def set_edit_pos(self, pos):
super().set_edit_pos(pos)
self._emit("edit-pos-changed", self.edit_pos)
def get_edit_pos(self):
return self._edit_pos
edit_pos = property(get_edit_pos, set_edit_pos)
def make_readonly(self):
self._bpy_selectable = False
# This is necessary to prevent the listbox we are in getting
# fresh cursor coords of None from get_cursor_coords
# immediately after we go readonly and then getting a cached
# canvas that still has the cursor set. It spots that
# inconsistency and raises.
self._invalidate()
def set_edit_markup(self, markup):
"""Call this when markup changes but the underlying text does not.
You should arrange for this to be called from the 'change' signal.
"""
if markup:
self._bpy_text, self._bpy_attr = urwid.decompose_tagmarkup(markup)
else:
# decompose_tagmarkup in some urwids fails on the empty list
self._bpy_text, self._bpy_attr = "", []
# This is redundant when we're called off the 'change' signal.
# I'm assuming this is cheap, making that ok.
self._invalidate()
def get_text(self):
return self._caption + self._bpy_text, self._attrib + self._bpy_attr
def selectable(self):
return self._bpy_selectable
def get_cursor_coords(self, *args, **kwargs):
# urwid gets confused if a nonselectable widget has a cursor position.
if not self._bpy_selectable:
return None
return super().get_cursor_coords(*args, **kwargs)
def render(self, size, focus=False):
# XXX I do not want to have to do this, but listbox gets confused
# if I do not (getting None out of get_cursor_coords because
# we just became unselectable, then having this render a cursor)
if not self._bpy_selectable:
focus = False
return super().render(size, focus=focus)
def get_pref_col(self, size):
# Need to make this deal with us being nonselectable
if not self._bpy_selectable:
return "left"
return super().get_pref_col(size)
def move_cursor_to_coords(self, *args):
if self._bpy_may_move_cursor:
return super().move_cursor_to_coords(*args)
return False
def keypress(self, size, key):
if urwid.command_map[key] in ("cursor up", "cursor down"):
# Do not handle up/down arrow, leave them for the repl.
return key
self._bpy_may_move_cursor = True
try:
if urwid.command_map[key] == "cursor max left":
self.edit_pos = 0
elif urwid.command_map[key] == "cursor max right":
self.edit_pos = len(self.get_edit_text())
elif urwid.command_map[key] == "clear word":
# ^w
if self.edit_pos == 0:
return
line = self.get_edit_text()
# delete any space left of the cursor
p = len(line[: self.edit_pos].strip())
line = line[:p] + line[self.edit_pos :]
# delete a full word
np = line.rfind(" ", 0, p)
if np == -1:
line = line[p:]
np = 0
else:
line = line[:np] + line[p:]
self.set_edit_text(line)
self.edit_pos = np
elif urwid.command_map[key] == "clear line":
line = self.get_edit_text()
self.set_edit_text(line[self.edit_pos :])
self.edit_pos = 0
elif key == "backspace":
line = self.get_edit_text()
cpos = len(line) - self.edit_pos
if not (cpos or len(line) % self.tab_length or line.strip()):
self.set_edit_text(line[: -self.tab_length])
else:
return super().keypress(size, key)
else:
# TODO: Add in specific keypress fetching code here
return super().keypress(size, key)
return None
finally:
self._bpy_may_move_cursor = False
def mouse_event(self, *args):
self._bpy_may_move_cursor = True
try:
return super().mouse_event(*args)
finally:
self._bpy_may_move_cursor = False
class BPythonListBox(urwid.ListBox):
"""Like `urwid.ListBox`, except that it does not eat up and
down keys.
"""
def keypress(self, size, key):
if key not in ("up", "down"):
return urwid.ListBox.keypress(self, size, key)
return key
class Tooltip(urwid.BoxWidget):
"""Container inspired by Overlay to position our tooltip.
bottom_w should be a BoxWidget.
The top window currently has to be a listbox to support shrinkwrapping.
This passes keyboard events to the bottom instead of the top window.
It also positions the top window relative to the cursor position
from the bottom window and hides it if there is no cursor.
"""
def __init__(self, bottom_w, listbox):
super().__init__()
self.bottom_w = bottom_w
self.listbox = listbox
# TODO: this linebox should use the 'main' color.
self.top_w = urwid.LineBox(listbox)
self.tooltip_focus = False
def selectable(self):
return self.bottom_w.selectable()
def keypress(self, size, key):
return self.bottom_w.keypress(size, key)
def mouse_event(self, size, event, button, col, row, focus):
# TODO: pass to top widget if visible and inside it.
if not hasattr(self.bottom_w, "mouse_event"):
return False
return self.bottom_w.mouse_event(size, event, button, col, row, focus)
def get_cursor_coords(self, size):
return self.bottom_w.get_cursor_coords(size)
def render(self, size, focus=False):
maxcol, maxrow = size
bottom_c = self.bottom_w.render(size, focus)
cursor = bottom_c.cursor
if not cursor:
# Hide the tooltip if there is no cursor.
return bottom_c
cursor_x, cursor_y = cursor
if cursor_y * 2 < maxrow:
# Cursor is in the top half. Tooltip goes below it:
y = cursor_y + 1
rows = maxrow - y
else:
# Cursor is in the bottom half. Tooltip fills the area above:
y = 0
rows = cursor_y
# HACK: shrink-wrap the tooltip. This is ugly in multiple ways:
# - It only works on a listbox.
# - It assumes the wrapping LineBox eats one char on each edge.
# - It is a loop.
# (ideally it would check how much free space there is,
# instead of repeatedly trying smaller sizes)
while "bottom" in self.listbox.ends_visible((maxcol - 2, rows - 3)):
rows -= 1
# If we're displaying above the cursor move the top edge down:
if not y:
y = cursor_y - rows
# Render *both* windows focused. This is probably not normal in urwid,
# but it works nicely.
top_c = self.top_w.render((maxcol, rows), focus and self.tooltip_focus)
combi_c = urwid.CanvasOverlay(top_c, bottom_c, 0, y)
# Use the cursor coordinates from the bottom canvas.
canvas = urwid.CompositeCanvas(combi_c)
canvas.cursor = cursor
return canvas
class URWIDInteraction(repl.Interaction):
def __init__(self, config, statusbar, frame):
super().__init__(config)
self.statusbar = statusbar
self.frame = frame
urwid.connect_signal(statusbar, "prompt_result", self._prompt_result)
self.callback = None
def confirm(self, q, callback):
"""Ask for yes or no and call callback to return the result"""
def callback_wrapper(result):
callback(result.lower() in (_("y"), _("yes")))
self.prompt(q, callback_wrapper, single=True)
def notify(self, s, n=10, wait_for_keypress=False):
return self.statusbar.message(s, n)
def prompt(self, s, callback=None, single=False):
"""Prompt the user for input. The result will be returned via calling
callback. Note that there can only be one prompt active. But the
callback can already start a new prompt."""
if self.callback is not None:
raise Exception("Prompt already in progress")
self.callback = callback
self.statusbar.prompt(s, single=single)
self.frame.set_focus("footer")
def _prompt_result(self, text):
self.frame.set_focus("body")
if self.callback is not None:
# The callback might want to start another prompt, so reset it
# before calling the callback.
callback = self.callback
self.callback = None
callback(text)
def file_prompt(self, s: str) -> Optional[str]:
raise NotImplementedError
class URWIDRepl(repl.Repl):
_time_between_redraws = 0.05 # seconds
def __init__(self, event_loop, palette, interpreter, config):
super().__init__(interpreter, config)
self._redraw_handle = None
self._redraw_pending = False
self._redraw_time = 0
self.listbox = BPythonListBox(urwid.SimpleListWalker([]))
self.tooltip = urwid.ListBox(urwid.SimpleListWalker([]))
self.tooltip.grid = None
self.overlay = Tooltip(self.listbox, self.tooltip)
self.stdout_hist = "" # native str (unicode in Py3)
self.frame = urwid.Frame(self.overlay)
if urwid.get_encoding_mode() == "narrow":
input_filter = decoding_input_filter
else:
input_filter = None
# This constructs a raw_display.Screen, which nabs sys.stdin/out.
self.main_loop = urwid.MainLoop(
self.frame,
palette,
event_loop=event_loop,
unhandled_input=self.handle_input,
input_filter=input_filter,
handle_mouse=False,
)
# String is straight from bpython.cli
self.statusbar = Statusbar(
config,
_(
" <%s> Rewind <%s> Save <%s> Pastebin "
" <%s> Pager <%s> Show Source "
)
% (
config.undo_key,
config.save_key,
config.pastebin_key,
config.last_output_key,
config.show_source_key,
),
self.main_loop,
)
self.frame.set_footer(self.statusbar.widget)
self.interact = URWIDInteraction(
self.config, self.statusbar, self.frame
)
self.edits = []
self.edit = None
self.current_output = None
self._completion_update_suppressed = False
# Bulletproof: this is a value extract_exit_value accepts.
self.exit_value = ()
load_urwid_command_map(config)
# Subclasses of Repl need to implement echo, current_line, cw
def echo(self, orig_s):
s = orig_s.rstrip("\n")
if s:
if self.current_output is None:
self.current_output = urwid.Text(("output", s))
if self.edit is None:
self.listbox.body.append(self.current_output)
# Focus the widget we just added to force the
# listbox to scroll. This causes output to scroll
# if the user runs a blocking call that prints
# more than a screenful, instead of staying
# scrolled to the previous input line and then
# jumping to the bottom when done.
self.listbox.set_focus(len(self.listbox.body) - 1)
else:
self.listbox.body.insert(-1, self.current_output)
# The edit widget should be focused and *stay* focused.
# XXX TODO: make sure the cursor stays in the same spot.
self.listbox.set_focus(len(self.listbox.body) - 1)
else:
# XXX this assumes this all has "output" markup applied.
self.current_output.set_text(
("output", self.current_output.text + s)
)
if orig_s.endswith("\n"):
self.current_output = None
# If we hit this repeatedly in a loop the redraw is rather
# slow (testcase: pprint(__builtins__). So if we have recently
# drawn the screen already schedule a call in the future.
#
# Unfortunately we may hit this function repeatedly through a
# blocking call triggered by the user, in which case our
# timeout will not run timely as we do not return to urwid's
# eventloop. So we manually check if our timeout has long
# since expired, and redraw synchronously if it has.
if self._redraw_handle is None:
self.main_loop.draw_screen()
def maybe_redraw(loop, self):
if self._redraw_pending:
loop.draw_screen()
self._redraw_pending = False
self._redraw_handle = None
self._redraw_handle = self.main_loop.set_alarm_in(
self._time_between_redraws, maybe_redraw, self
)
self._redraw_time = time.time()
else:
self._redraw_pending = True
now = time.time()
if now - self._redraw_time > 2 * self._time_between_redraws:
# The timeout is well past expired, assume we're
# blocked and redraw synchronously.
self.main_loop.draw_screen()
self._redraw_time = now
def _get_current_line(self):
if self.edit is None:
return ""
return self.edit.get_edit_text()
def _set_current_line(self, line):
self.edit.set_edit_text(line)
current_line = property(
_get_current_line,
_set_current_line,
None,
"Return the current line (the one the cursor is in).",
)
def cw(self):
"""Return the current word (incomplete word left of cursor)."""
if self.edit is None:
return
pos = self.edit.edit_pos
text = self.edit.get_edit_text()
if pos != len(text):
# Disable autocomplete if not at end of line, like cli does.
return
# Stolen from cli. TODO: clean up and split out.
if not text or (not text[-1].isalnum() and text[-1] not in (".", "_")):
return
# Seek backwards in text for the first non-identifier char:
for i, c in enumerate(reversed(text)):
if not c.isalnum() and c not in (".", "_"):
break
else:
# No non-identifiers, return everything.
return text
# Return everything to the right of the non-identifier.
return text[-i:]
@property
def cpos(self):
if self.edit is not None:
return len(self.current_line) - self.edit.edit_pos
return 0
def _get_cursor_offset(self):
return self.edit.edit_pos
def _set_cursor_offset(self, offset):
self.edit.edit_pos = offset
cursor_offset = property(
_get_cursor_offset,
_set_cursor_offset,
None,
"The cursor offset from the beginning of the line",
)
def _populate_completion(self):
widget_list = self.tooltip.body
while widget_list:
widget_list.pop()
# This is just me flailing around wildly. TODO: actually write.
if self.complete():
if self.funcprops:
# This is mostly just stolen from the cli module.
func_name = self.funcprops.func
args = self.funcprops.argspec.args
is_bound = self.funcprops.is_bound_method
in_arg = self.arg_pos
varargs = self.funcprops.argspec.varargs
varkw = self.funcprops.argspec.varkwargs
defaults = self.funcprops.argspec.defaults
kwonly = self.funcprops.argspec.kwonly
kwonly_defaults = self.funcprops.argspec.kwonly_defaults or {}
markup = [("bold name", func_name), ("name", ": (")]
# the isinstance checks if we're in a positional arg
# (instead of a keyword arg), I think
if is_bound and isinstance(in_arg, int):
in_arg += 1
# bpython.cli checks if this goes off the edge and
# does clever wrapping. I do not (yet).
for k, i in enumerate(args):
if defaults and k + 1 > len(args) - len(defaults):
kw = repr(defaults[k - (len(args) - len(defaults))])
else:
kw = None
if not k and str(i) == "self":
color = "name"
else:
color = "token"
if k == in_arg or i == in_arg:
color = "bold " + color
markup.append((color, str(i)))
if kw is not None:
markup.extend([("punctuation", "="), ("token", kw)])
if k != len(args) - 1:
markup.append(("punctuation", ", "))
if varargs:
if args:
markup.append(("punctuation", ", "))
markup.append(("token", "*" + varargs))
if kwonly:
if not varargs:
if args:
markup.append(("punctuation", ", "))
markup.append(("punctuation", "*"))
for arg in kwonly:
if arg == in_arg:
color = "bold token"
else:
color = "token"
markup.extend([("punctuation", ", "), (color, arg)])
if arg in kwonly_defaults:
markup.extend(
[
("punctuation", "="),
("token", repr(kwonly_defaults[arg])),
]
)
if varkw:
if args or varargs or kwonly:
markup.append(("punctuation", ", "))
markup.append(("token", "**" + varkw))
markup.append(("punctuation", ")"))
widget_list.append(urwid.Text(markup))
if self.matches_iter.matches:
attr_map = {}
focus_map = {"main": "operator"}
texts = [
urwid.AttrMap(
urwid.Text(("main", match)), attr_map, focus_map
)
for match in self.matches_iter.matches
]
width = max(text.original_widget.pack()[0] for text in texts)
gridflow = urwid.GridFlow(texts, width, 1, 0, "left")
widget_list.append(gridflow)
self.tooltip.grid = gridflow
self.overlay.tooltip_focus = False
else:
self.tooltip.grid = None
self.frame.body = self.overlay
else:
self.frame.body = self.listbox
self.tooltip.grid = None
if self.docstring:
# TODO: use self.format_docstring? needs a width/height...
docstring = self.docstring
widget_list.append(urwid.Text(("comment", docstring)))
def reprint_line(self, lineno, tokens):
edit = self.edits[-len(self.buffer) + lineno - 1]
edit.set_edit_markup(list(format_tokens(tokens)))
def getstdout(self):
"""This method returns the 'spoofed' stdout buffer, for writing to a
file or sending to a pastebin or whatever."""
return self.stdout_hist + "\n"
def ask_confirmation(self, q):
"""Ask for yes or no and return boolean"""
try:
reply = self.statusbar.prompt(q)
except ValueError:
return False
return reply.lower() in ("y", "yes")
def reevaluate(self):
"""Clear the buffer, redraw the screen and re-evaluate the history"""
self.evaluating = True
self.stdout_hist = ""
self.f_string = ""
self.buffer = []
self.scr.erase()
# Set cursor position to -1 to prevent paren matching
self.cpos = -1
self.prompt(False)
self.iy, self.ix = self.scr.getyx()
for line in self.history:
self.stdout_hist += line + "\n"
self.print_line(line)
# I decided it was easier to just do this manually
# than to make the print_line and history stuff more flexible.
self.scr.addstr("\n")
more = self.push(line)
self.prompt(more)
self.iy, self.ix = self.scr.getyx()
self.cpos = 0
indent = repl.next_indentation(self.s, self.config.tab_length)
self.s = ""
self.scr.refresh()
if self.buffer:
for unused in range(indent):
self.tab()
self.evaluating = False
# map(self.push, self.history)
# ^-- That's how simple this method was at first :(
def write(self, s):
"""For overriding stdout defaults"""
if "\x04" in s:
for block in s.split("\x04"):
self.write(block)
return
if s.rstrip() and "\x03" in s:
t = s.split("\x03")[1]
else:
t = s
if not self.stdout_hist:
self.stdout_hist = t
else:
self.stdout_hist += t
self.echo(s)
def push(self, s, insert_into_history=True):
# Restore the original SIGINT handler. This is needed to be able
# to break out of infinite loops. If the interpreter itself
# sees this it prints 'KeyboardInterrupt' and returns (good).
orig_handler = signal.getsignal(signal.SIGINT)
signal.signal(signal.SIGINT, signal.default_int_handler)
# Pretty blindly adapted from bpython.cli
try:
return super().push(s, insert_into_history)
except SystemExit as e:
self.exit_value = e.args
raise urwid.ExitMainLoop()
except KeyboardInterrupt:
# KeyboardInterrupt happened between the except block around
# user code execution and this code. This should be rare,
# but make sure to not kill bpython here, so leaning on
# ctrl+c to kill buggy code running inside bpython is safe.
self.keyboard_interrupt()
finally:
signal.signal(signal.SIGINT, orig_handler)
def start(self):
self.prompt(False)
def keyboard_interrupt(self):
# If the user is currently editing, interrupt him. This
# mirrors what the regular python REPL does.
if self.edit is not None:
# XXX this is a lot of code, and I am not sure it is
# actually enough code. Needs some testing.
self.edit.make_readonly()
self.edit = None
self.buffer = []
self.echo("KeyboardInterrupt")
self.prompt(False)
else:
# I do not quite remember if this is reachable, but let's
# be safe.
self.echo("KeyboardInterrupt")
def prompt(self, more):
# Clear current output here, or output resulting from the
# current prompt run will end up appended to the edit widget
# sitting above this prompt:
self.current_output = None
# XXX is this the right place?
self.rl_history.reset()
# We need the caption to use unicode as urwid normalizes later
# input to be the same type, using ascii as encoding. If the
# caption is bytes this breaks typing non-ascii into bpython.
if not more:
caption = ("prompt", self.ps1)
self.stdout_hist += self.ps1
else:
caption = ("prompt_more", self.ps2)
self.stdout_hist += self.ps2
self.edit = BPythonEdit(self.config, caption=caption)
urwid.connect_signal(self.edit, "change", self.on_input_change)
urwid.connect_signal(
self.edit, "edit-pos-changed", self.on_edit_pos_changed
)
# Do this after connecting the change signal handler:
self.edit.insert_text(4 * self.next_indentation() * " ")
self.edits.append(self.edit)
self.listbox.body.append(self.edit)
self.listbox.set_focus(len(self.listbox.body) - 1)
# Hide the tooltip
self.frame.body = self.listbox
def on_input_change(self, edit, text):
# TODO: we get very confused here if "text" contains newlines,
# so we cannot put our edit widget in multiline mode yet.
# That is probably fixable...
tokens = self.tokenize(text, False)
edit.set_edit_markup(list(format_tokens(tokens)))
if not self._completion_update_suppressed:
# If we call this synchronously the get_edit_text() in repl.cw
# still returns the old text...
self.main_loop.set_alarm_in(
0, lambda *args: self._populate_completion()
)
def on_edit_pos_changed(self, edit, position):
"""Gets called when the cursor position inside the edit changed.
Rehighlight the current line because there might be a paren under
the cursor now."""
tokens = self.tokenize(self.current_line, False)
edit.set_edit_markup(list(format_tokens(tokens)))
def handle_input(self, event):
# Since most of the input handling here should be handled in the edit
# instead, we return here early if the edit doesn't have the focus.
if self.frame.get_focus() != "body":
return
if event == "enter":
inp = self.edit.get_edit_text()
self.history.append(inp)
self.edit.make_readonly()
self.stdout_hist += inp
self.stdout_hist += "\n"
self.edit = None
# This may take a while, so force a redraw first:
self.main_loop.draw_screen()
more = self.push(inp)
self.prompt(more)
elif event == "ctrl d":
# ctrl+d on an empty line exits, otherwise deletes
if self.edit is not None:
if not self.edit.get_edit_text():
raise urwid.ExitMainLoop()
else:
self.main_loop.process_input(["delete"])
elif urwid.command_map[event] == "cursor up":
# "back" from bpython.cli
self.rl_history.enter(self.edit.get_edit_text())
self.edit.set_edit_text("")
self.edit.insert_text(self.rl_history.back())
elif urwid.command_map[event] == "cursor down":
# "fwd" from bpython.cli
self.rl_history.enter(self.edit.get_edit_text())
self.edit.set_edit_text("")
self.edit.insert_text(self.rl_history.forward())
elif urwid.command_map[event] == "next selectable":
self.tab()
elif urwid.command_map[event] == "prev selectable":
self.tab(True)
# else:
# self.echo(repr(event))
def tab(self, back=False):
"""Process the tab key being hit.
If the line is blank or has only whitespace: indent.
If there is text before the cursor: cycle completions.
If `back` is True cycle backwards through completions, and return
instead of indenting.
Returns True if the key was handled.
"""
self._completion_update_suppressed = True
try:
# Heavily inspired by cli's tab.
text = self.edit.get_edit_text()
if not text.lstrip() and not back:
x_pos = len(text) - self.cpos
num_spaces = x_pos % self.config.tab_length
if not num_spaces:
num_spaces = self.config.tab_length
self.edit.insert_text(" " * num_spaces)
return True
if not self.matches_iter:
self.complete(tab=True)
cw = self.current_string() or self.cw()
if not cw:
return True
if self.matches_iter.is_cseq():
cursor, text = self.matches_iter.substitute_cseq()
self.edit.set_edit_text(text)
self.edit.edit_pos = cursor
elif self.matches_iter.matches:
if back:
self.matches_iter.previous()
else:
next(self.matches_iter)
cursor, text = self.matches_iter.cur_line()
self.edit.set_edit_text(text)
self.edit.edit_pos = cursor
self.overlay.tooltip_focus = True
if self.tooltip.grid:
self.tooltip.grid.set_focus(self.matches_iter.index)
return True
finally:
self._completion_update_suppressed = False
def main(args=None, locals_=None, banner=None):
translations.init()
def options_callback(group):
group.add_argument(
"--twisted",
"-T",
action="store_true",
help=_("Run twisted reactor."),
)
group.add_argument(
"--reactor",
"-r",
help=_(
"Select specific reactor (see --help-reactors). "
"Implies --twisted."
),
)
group.add_argument(
"--help-reactors",
action="store_true",
help=_("List available reactors for -r."),
)
group.add_argument(
"--plugin",
"-p",
help=_(
"twistd plugin to run (use twistd for a list). "
'Use "--" to pass further options to the plugin.'
),
)
group.add_argument(
"--server",
"-s",
type=int,
help=_("Port to run an eval server on (forces Twisted)."),
)
# TODO: maybe support displays other than raw_display?
config, options, exec_args = bpargs.parse(
args,
(
"Urwid options",
None,
options_callback,
),
)
if options.help_reactors:
try:
from twisted.application import reactors
# Stolen from twisted.application.app (twistd).
for r in reactors.getReactorTypes():
print(f" {r.shortName:<4}\t{r.description}")
except ImportError:
sys.stderr.write(
"No reactors are available. Please install "
"twisted for reactor support.\n"
)
return
palette = [
(
name,
COLORMAP[color.lower()],
"default",
"bold" if color.isupper() else "default",
)
for name, color in config.color_scheme.items()
]
palette.extend(
[
("bold " + name, color + ",bold", background, monochrome)
for name, color, background, monochrome in palette
]
)
if options.server or options.plugin:
options.twisted = True
if options.reactor:
try:
from twisted.application import reactors
except ImportError:
sys.stderr.write(
"No reactors are available. Please install "
"twisted for reactor support.\n"
)
return
try:
# XXX why does this not just return the reactor it installed?
reactor = reactors.installReactor(options.reactor)
if reactor is None:
from twisted.internet import reactor
except reactors.NoSuchReactor:
sys.stderr.write(f"Reactor {options.reactor} does not exist\n")
return
event_loop = TwistedEventLoop(reactor)
elif options.twisted:
try:
from twisted.internet import reactor
except ImportError:
sys.stderr.write(
"No reactors are available. Please install "
"twisted for reactor support.\n"
)
return
event_loop = TwistedEventLoop(reactor)
else:
# None, not urwid.SelectEventLoop(), to work with
# screens that do not support external event loops.
event_loop = None
# TODO: there is also a glib event loop. Do we want that one?
extend_locals = {}
if options.plugin:
try:
from twisted import plugin
from twisted.application import service
except ImportError:
sys.stderr.write(
"No twisted plugins are available. Please install "
"twisted for twisted plugin support.\n"
)
return
for plug in plugin.getPlugins(service.IServiceMaker):
if plug.tapname == options.plugin:
break
else:
sys.stderr.write(f"Plugin {options.plugin} does not exist\n")
return
plugopts = plug.options()
plugopts.parseOptions(exec_args)
serv = plug.makeService(plugopts)
extend_locals["service"] = serv
reactor.callWhenRunning(serv.startService)
exec_args = []
interpreter = repl.Interpreter(locals_)
# TODO: replace with something less hack-ish
interpreter.locals.update(extend_locals)
# This nabs sys.stdin/out via urwid.MainLoop
myrepl = URWIDRepl(event_loop, palette, interpreter, config)
if options.server:
factory = EvalFactory(myrepl)
reactor.listenTCP(options.server, factory, interface="127.0.0.1")
if options.reactor:
# Twisted sets a sigInt handler that stops the reactor unless
# it sees a different custom signal handler.
def sigint(*args):
reactor.callFromThread(myrepl.keyboard_interrupt)
signal.signal(signal.SIGINT, sigint)
# Save stdin, stdout and stderr for later restoration
orig_stdin = sys.stdin
orig_stdout = sys.stdout
orig_stderr = sys.stderr
# urwid's screen start() and stop() calls currently hit sys.stdin
# directly (via RealTerminal.tty_signal_keys), so start the screen
# before swapping sys.std*, and swap them back before restoring
# the screen. This also avoids crashes if our redirected sys.std*
# are called before we get around to starting the mainloop
# (urwid raises an exception if we try to draw to the screen
# before starting it).
def run_with_screen_before_mainloop():
try:
# Currently we just set this to None because I do not
# expect code hitting stdin to work. For example: exit()
# (not sys.exit, site.py's exit) tries to close sys.stdin,
# which breaks urwid's shutdown. bpython.cli sets this to
# a fake object that reads input through curses and
# returns it. When using twisted I do not think we can do
# that because sys.stdin.read and friends block, and we
# cannot re-enter the reactor. If using urwid's own
# mainloop we *might* be able to do something similar and
# re-enter its mainloop.
sys.stdin = None # FakeStdin(myrepl)
sys.stdout = myrepl
sys.stderr = myrepl
myrepl.main_loop.set_alarm_in(0, start)
while True:
try:
myrepl.main_loop.run()
except KeyboardInterrupt:
# HACK: if we run under a twisted mainloop this should
# never happen: we have a SIGINT handler set.
# If we use the urwid select-based loop we just restart
# that loop if interrupted, instead of trying to cook
# up an equivalent to reactor.callFromThread (which
# is what our Twisted sigint handler does)
myrepl.main_loop.set_alarm_in(
0, lambda *args: myrepl.keyboard_interrupt()
)
continue
break
finally:
sys.stdin = orig_stdin
sys.stderr = orig_stderr
sys.stdout = orig_stdout
# This needs more thought. What needs to happen inside the mainloop?
def start(main_loop, user_data):
if exec_args:
bpargs.exec_code(interpreter, exec_args)
if not options.interactive:
raise urwid.ExitMainLoop()
if not exec_args:
sys.path.insert(0, "")
# this is CLIRepl.startup inlined.
filename = os.environ.get("PYTHONSTARTUP")
if filename and os.path.isfile(filename):
with open(filename) as f:
interpreter.runsource(f.read(), filename, "exec")
if banner is not None:
myrepl.write(banner)
myrepl.write("\n")
# XXX these deprecation warnings need to go at some point
myrepl.write(
_(
"WARNING: You are using `bpython-urwid`, the urwid backend for `bpython`. This backend has been deprecated in version 0.19 and might disappear in a future version."
)
)
myrepl.write("\n")
myrepl.start()
# This bypasses main_loop.set_alarm_in because we must *not*
# hit the draw_screen call (it's unnecessary and slow).
def run_find_coroutine():
if myrepl.module_gatherer.find_coroutine():
main_loop.event_loop.alarm(0, run_find_coroutine)
run_find_coroutine()
myrepl.main_loop.screen.run_wrapper(run_with_screen_before_mainloop)
if config.flush_output and not options.quiet:
sys.stdout.write(myrepl.getstdout())
if hasattr(sys.stdout, "flush"):
sys.stdout.flush()
return repl.extract_exit_value(myrepl.exit_value)
def load_urwid_command_map(config):
urwid.command_map[key_dispatch[config.up_one_line_key]] = "cursor up"
urwid.command_map[key_dispatch[config.down_one_line_key]] = "cursor down"
urwid.command_map[key_dispatch["C-a"]] = "cursor max left"
urwid.command_map[key_dispatch["C-e"]] = "cursor max right"
urwid.command_map[key_dispatch[config.pastebin_key]] = "pastebin"
urwid.command_map[key_dispatch["C-f"]] = "cursor right"
urwid.command_map[key_dispatch["C-b"]] = "cursor left"
urwid.command_map[key_dispatch["C-d"]] = "delete"
urwid.command_map[key_dispatch[config.clear_word_key]] = "clear word"
urwid.command_map[key_dispatch[config.clear_line_key]] = "clear line"
"""
'clear_screen': 'C-l',
'cut_to_buffer': 'C-k',
'down_one_line': 'C-n',
'exit': '',
'last_output': 'F9',
'pastebin': 'F8',
'save': 'C-s',
'show_source': 'F2',
'suspend': 'C-z',
'undo': 'C-r',
'up_one_line': 'C-p',
'yank_from_buffer': 'C-y'},
"""
if __name__ == "__main__":
sys.exit(main())
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1390352
bpython-0.24/bpython.egg-info/0000755000175000017500000000000014361765332015067 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046169.0
bpython-0.24/bpython.egg-info/PKG-INFO0000644000175000017500000001511314361765331016164 0ustar00useruserMetadata-Version: 2.1
Name: bpython
Version: 0.24
Home-page: https://www.bpython-interpreter.org/
Author: Bob Farrell, Andreas Stuehrk, Sebastian Ramacher, Thomas Ballinger, et al.
Author-email: bpython@googlegroups.com
License: MIT
Project-URL: GitHub, https://github.com/bpython/bpython
Project-URL: Documentation, https://doc.bpython-interpreter.org
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Provides-Extra: clipboard
Provides-Extra: jedi
Provides-Extra: urwid
Provides-Extra: watch
License-File: LICENSE
.. image:: https://img.shields.io/pypi/v/bpython
:target: https://pypi.org/project/bpython
.. image:: https://readthedocs.org/projects/bpython/badge/?version=latest
:target: https://docs.bpython-interpreter.org/en/latest/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
****************************************************************
bpython: A fancy interface to the Python interactive interpreter
****************************************************************
`bpython`_ is a lightweight Python interpreter that adds several features common
to IDEs. These features include **syntax highlighting**, **expected parameter
list**, **auto-indentation**, and **autocompletion**. (See below for example
usage).
.. image:: https://bpython-interpreter.org/images/math.gif
:alt: bpython
:width: 566
:height: 348
:align: center
bpython does **not** aim to be a complete IDE - the focus is on implementing a
few ideas in a practical, useful, and lightweight manner.
bpython is a great replacement to any occasion where you would normally use the
vanilla Python interpreter - testing out solutions to people's problems on IRC,
quickly testing a method of doing something without creating a temporary file,
etc.
You can find more about bpython - including `full documentation`_ - at our
`homepage`_.
==========================
Installation & Basic Usage
==========================
Installation using Pip
----------------------
If you have `pip`_ installed, you can simply run:
.. code-block:: bash
$ pip install bpython
Start bpython by typing ``bpython`` in your terminal. You can exit bpython by
using the ``exit()`` command or by pressing control-D like regular interactive
Python.
===================
Features & Examples
===================
* Readline-like autocomplete, with suggestions displayed as you type.
* In-line syntax highlighting. This uses Pygments for lexing the code as you
type, and colours appropriately.
* Expected parameter list. As in a lot of modern IDEs, bpython will attempt to
display a list of parameters for any function you call. The inspect module (which
works with any Python function) is tried first, and then pydoc if that fails.
* Rewind. This isn't called "Undo" because it would be misleading, but "Rewind"
is probably as bad. The idea is that the code entered is kept in memory and
when the Rewind function is called, the last line is popped and the entire
session is re-evaluated. Use to rewind.
* Edit the current line or your entire session in an editor. F7 opens the current
session in a text editor, and if modifications are made, the session is rerun
with these changes.
* Pastebin code/write to file. Use the key to upload the screen's contents
to pastebin, with a URL returned.
* Reload imported Python modules. Use to clear sys.modules and rerun your
session to test changes to code in a module you're working on.
=============
Configuration
=============
See the sample-config file for a list of available options. You should save
your config file as **~/.config/bpython/config** (i.e.
``$XDG_CONFIG_HOME/bpython/config``) or specify at the command line::
bpython --config /path/to/bpython/config
============
Dependencies
============
* Pygments
* curtsies >= 0.4.0
* greenlet
* pyxdg
* requests
* Sphinx >= 1.5 (optional, for the documentation)
* babel (optional, for internationalization)
* jedi (optional, for experimental multiline completion)
* watchdog (optional, for monitoring imported modules for changes)
* pyperclip (optional, for copying to the clipboard)
bpython-urwid
-------------
``bpython-urwid`` requires the following additional packages:
* urwid
===================================
Installation via OS Package Manager
===================================
The majority of desktop computer operating systems come with package management
systems. If you use one of these OSes, you can install ``bpython`` using the
package manager.
Ubuntu/Debian
-------------
Ubuntu/Debian family Linux users can install ``bpython`` using the ``apt``
package manager, using the command with ``sudo`` privileges:
.. code-block:: bash
$ apt install bpython
In case you are using an older version, run
.. code-block:: bash
$ apt-get install bpython
Arch Linux
----------
Arch Linux uses ``pacman`` as the default package manager; you can use it to install ``bpython``:
.. code-block:: bash
$ pacman -S bpython
Fedora
------
Fedora users can install ``bpython`` directly from the command line using ``dnf``.
.. code-block:: bash
$ dnf install bpython
GNU Guix
----------
Guix users can install ``bpython`` on any GNU/Linux distribution directly from the command line:
.. code-block:: bash
$ guix install bpython
macOS
-----
macOS does not include a package manager by default. If you have installed any
third-party package manager like MacPorts, you can install it via
.. code-block:: bash
$ sudo port install py-bpython
==========
Known Bugs
==========
For known bugs please see bpython's `known issues and FAQ`_ page.
======================
Contact & Contributing
======================
I hope you find it useful and please feel free to submit any bugs/patches
suggestions to `Robert`_ or place them on the GitHub
`issues tracker`_.
For any other ways of communicating with bpython users and devs you can find us
at the community page on the `project homepage`_, or in the `community`_.
Hope to see you there!
.. _homepage: http://www.bpython-interpreter.org
.. _full documentation: http://docs.bpython-interpreter.org/
.. _issues tracker: http://github.com/bpython/bpython/issues/
.. _pip: https://pip.pypa.io/en/latest/index.html
.. _project homepage: http://bpython-interpreter.org
.. _community: http://docs.bpython-interpreter.org/community.html
.. _Robert: robertanthonyfarrell@gmail.com
.. _bpython: http://www.bpython-interpreter.org/
.. _Curses: http://www.lfd.uci.edu/~gohlke/pythonlibs/
.. _pyreadline: http://pypi.python.org/pypi/pyreadline/
.. _known issues and FAQ: http://bpython-interpreter.org/known-issues-and-faq.html
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046170.0
bpython-0.24/bpython.egg-info/SOURCES.txt0000644000175000017500000000646414361765332016765 0ustar00useruserAUTHORS.rst
CHANGELOG.rst
LICENSE
MANIFEST.in
README.rst
pyproject.toml
setup.cfg
setup.py
bpdb/__init__.py
bpdb/__main__.py
bpdb/debugger.py
bpython/__init__.py
bpython/__main__.py
bpython/_internal.py
bpython/_typing_compat.py
bpython/_version.py
bpython/args.py
bpython/autocomplete.py
bpython/cli.py
bpython/config.py
bpython/curtsies.py
bpython/filelock.py
bpython/formatter.py
bpython/history.py
bpython/importcompletion.py
bpython/inspection.py
bpython/keys.py
bpython/lazyre.py
bpython/line.py
bpython/pager.py
bpython/paste.py
bpython/patch_linecache.py
bpython/repl.py
bpython/sample-config
bpython/simpleeval.py
bpython/urwid.py
bpython.egg-info/PKG-INFO
bpython.egg-info/SOURCES.txt
bpython.egg-info/dependency_links.txt
bpython.egg-info/entry_points.txt
bpython.egg-info/requires.txt
bpython.egg-info/top_level.txt
bpython/curtsiesfrontend/__init__.py
bpython/curtsiesfrontend/_internal.py
bpython/curtsiesfrontend/coderunner.py
bpython/curtsiesfrontend/events.py
bpython/curtsiesfrontend/filewatch.py
bpython/curtsiesfrontend/interaction.py
bpython/curtsiesfrontend/interpreter.py
bpython/curtsiesfrontend/manual_readline.py
bpython/curtsiesfrontend/parse.py
bpython/curtsiesfrontend/preprocess.py
bpython/curtsiesfrontend/repl.py
bpython/curtsiesfrontend/replpainter.py
bpython/curtsiesfrontend/sitefix.py
bpython/test/__init__.py
bpython/test/test.config
bpython/test/test.theme
bpython/test/test_args.py
bpython/test/test_autocomplete.py
bpython/test/test_brackets_completion.py
bpython/test/test_config.py
bpython/test/test_crashers.py
bpython/test/test_curtsies.py
bpython/test/test_curtsies_coderunner.py
bpython/test/test_curtsies_painting.py
bpython/test/test_curtsies_parser.py
bpython/test/test_curtsies_repl.py
bpython/test/test_filewatch.py
bpython/test/test_history.py
bpython/test/test_importcompletion.py
bpython/test/test_inspection.py
bpython/test/test_interpreter.py
bpython/test/test_keys.py
bpython/test/test_line_properties.py
bpython/test/test_manual_readline.py
bpython/test/test_preprocess.py
bpython/test/test_repl.py
bpython/test/test_simpleeval.py
bpython/test/fodder/__init__.py
bpython/test/fodder/encoding_ascii.py
bpython/test/fodder/encoding_latin1.py
bpython/test/fodder/encoding_utf8.py
bpython/test/fodder/original.py
bpython/test/fodder/processed.py
bpython/translations/__init__.py
bpython/translations/de/LC_MESSAGES/bpython.po
bpython/translations/es_ES/LC_MESSAGES/bpython.po
bpython/translations/fr_FR/LC_MESSAGES/bpython.po
bpython/translations/it_IT/LC_MESSAGES/bpython.po
bpython/translations/nl_NL/LC_MESSAGES/bpython.po
data/bpython.png
data/org.bpython-interpreter.bpython.desktop
data/org.bpython-interpreter.bpython.metainfo.xml
doc/sphinx/source/authors.rst
doc/sphinx/source/bpaste.rst
doc/sphinx/source/bpdb.rst
doc/sphinx/source/changelog.rst
doc/sphinx/source/community.rst
doc/sphinx/source/conf.py
doc/sphinx/source/configuration-options.rst
doc/sphinx/source/configuration.rst
doc/sphinx/source/contributing.rst
doc/sphinx/source/django.rst
doc/sphinx/source/index.rst
doc/sphinx/source/logo.png
doc/sphinx/source/man-bpython-config.rst
doc/sphinx/source/man-bpython.rst
doc/sphinx/source/releases.rst
doc/sphinx/source/simplerepl.py
doc/sphinx/source/simplerepl.rst
doc/sphinx/source/themes.rst
doc/sphinx/source/tips.rst
doc/sphinx/source/windows.rst
theme/light.theme
theme/sample.theme
theme/windows.theme././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046169.0
bpython-0.24/bpython.egg-info/dependency_links.txt0000644000175000017500000000000114361765331021134 0ustar00useruser
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046169.0
bpython-0.24/bpython.egg-info/entry_points.txt0000644000175000017500000000022014361765331020356 0ustar00useruser[console_scripts]
bpdb = bpdb:main
bpython = bpython.curtsies:main
bpython-curses = bpython.cli:main
bpython-urwid = bpython.urwid:main [urwid]
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046170.0
bpython-0.24/bpython.egg-info/requires.txt0000644000175000017500000000031414361765332017465 0ustar00userusercurtsies>=0.4.0
cwcwidth
greenlet
pygments
pyxdg
requests
[:python_version < "3.8"]
backports.cached-property
typing-extensions
[clipboard]
pyperclip
[jedi]
jedi>=0.16
[urwid]
urwid
[watch]
watchdog
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046170.0
bpython-0.24/bpython.egg-info/top_level.txt0000644000175000017500000000001514361765332017615 0ustar00useruserbpdb
bpython
././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.146035
bpython-0.24/data/0000755000175000017500000000000014361765332012623 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/data/bpython.png0000644000175000017500000001707314254577175015033 0ustar00useruser�PNG
IHDRVVUVa�tEXtSoftwareAdobe ImageReadyq�e<�"iTXtXML:com.adobe.xmp ݘC�IDATx��]t�y�����KZ=,!K���mLlvb0� ) P@O���B��$Mm��$��gO�6
i��MB�$%�p����81`d�Y�$�}�����1�3����2b}�����|��������3�P�c����'��'h:�tC�Ա(�-G���]'�z-��>�kD�uZ$V�#Q����b F#�D*������\-=�52��ӣV6S��2�1Z�obRǞȏ
���S��W��-���\���uN���om\��XӖ�y6��zM�ԃ�& �0lj9���"���p<�{���(e6�=q���_�K��8�E�H3�����~w��w}m������,��}���/M���/|)ٸ�Vj���| ������督���[,����q���rPqb������㽝O��lE.{�K�:����]7_�m��.f��y*/��;d�
����'��<ǥ�5�>�
�Bab$��f��Ϡx}˪��=_�'x\,�V��N��\������ϛ���i+�75�hb�3 %?.QZ)�0�9����~���8�9^߾����>q]4����iԶ岫���G2�z���Zw�5���(�5�D,�by\��c`r`��8��8��_բqԽ���}��S�섗^z;������Dw 0F�d�i���U��
� SX��d{i�#��rs��g>W��si�� A���)���+�P��|{�o�������
��:(�d�9���
�]����${��%(h2P��"��&��$_��O�q���
�l��}����F��u͍����F�����V�W�U��ԍ�����0R_�b(`��9��H����ֶ(~j*�i�.]�M5�
�$��"��5C/��V��_�OƸ+Ō**��*��,v�_~�D���:y�Xx&܉S,�\�c[�F:���j:{�5���i8�E�"�V\Q|W�X\A��Eù��̽���� )�e�E$�$2嬁p���SF2˒�Q�q,�uuW�ڕ���m�����k4�80�L�8�ҩ��x��:%�^���QXƞuSS��ʂ��s�K��SI����� �.�XSu+:vp��cY2�#Xy�7t>0+`�F�
\.u3&/uÊ�*�*A�ٗ�*��A��a*�\�mDM'��19�AH��"zT
^T#�T}�Nn0c�@��[f>�����Gc�8��a���������U�b �4�H��K�/S9�Zn� s~�`pLx����AcB���t�%p�6���"�a��p?|F�,��!w��Q`p���i��=�FPn�{���_��c�+�J+S��X*��UB�Y�7��Yº;�K�?�H$���UDž��|
�C �[��A��s�
7��C2]v�L \����%0S~��<��q�*N��ѡbf��I%l���,_����-�rJ�����x�ZT�B �$���]_��ټ^���?V�mP�$Hʸ�?�ҢRҙ�� /Rأ�����{������Oy&?:0� ����Ⱥ���L��ʨ�e ����
�:����-��H
�RI�K���l�纁͑D���j@\��Z͈������v�������������+L��;YPU�T�U��p�,���SM�I�M����Jc}::�M�kT��o�ɄܨC�_�#��=��|��G|&
����|���ܲ�ο�������d��r�59��[u���rȧ�=%�����J:!�� eCl�A���y�)/L}¹O��������]u��㊛n�^
g$�ܪ���c����JU��$D��!ٵ��S�����O ]�J�pN4(�x����Ǣk/����;������B�
d*��8
�ˬק�W�
I��2�r7�K�j�%+`��Z\7�"�/��GK�6�+\Ӎ.�K Uq��U�����FF��S,ȕ¦��6���A`��p �[n����i����f�bg�b1&խ�����r{�#o����3*Dt�E���p���%p-&�k��H��焿_q��@a�+M��j\{�&͈/U�����:s�
�"�Lp[AU�ڗJ{�J0e^��:_<7�DS�٠�$V�
P.\^Z�b#Y������
N\��dBQ���O�D0�X]S+ѴzG��n��W5H�n�;�]g�6:�6G�6H(h|M{jMK}�IJ����q��iҩ���]|����S���<6�S��8E��
��gJ@�f��R7Y��]x�5�7��'�����|��O����w&r2����2�U>0p���#cã���˩��X��
E!3cJzn�*vDW��1�,�ꆍ�vl��m8{���5�.����0�B-�6_zu���KC��s��������|����hc�N��W:����k=��yݖ�m(gU2��y����jF��a���)t��J2"�$L�~��cD���9���G��x��J��"1
������s�]�|��ݹ�˿���3 o����9+��v�ef�qbټ��!2>�'Ȅk��?^i�|�
e�z�%�hI��tb{i��S��U٬.�h�Ȅ��L\�j�C�>��Si��~��̎ull������������D��k��NU�u0�yI��3��B�e�y�JC�\FD��U�^�H���Y���XY,�qbĉQ�B55z���w|�S~��7�)�6����gn�����B�������5�������/Y�_�k�������۷lj�GUGfl���y�̬tx:�W`�e�J{)#�����hP�Rr&�Z]��pם�n�G�v�"�a�\Uu��h������ ��yFV��S��L6a9���9-Eg�*�|��es��-#��I�Ǟ>�?Ћ'ڗ�q�FtB�[��VĒ�(��!��r>�AZٖlU� 6�V��X%ݢޒ�Yiquv����=��IF���5��ݫ?Һ-��K�T�';wdc�ע������77��n� �+��-��)���Om}��W��Ct���@F'%2�&��Ff�
0el� V��R���@�����vΞL��/i��四�`Y2i`~��HAD�� v��E���2��{Ձ�\��]����_����k�"�(�[~�/۶��n$�a�c�q��
�
�As+"��q#�*����7ֶ��F�bx/��T��"@x��yŖ79��v�&�غa{���w���s��k�O\0�XT3����)�C�l�`)�Q�x��\�&^��^�.��pȴ`��WlZw�ǿظa�_P�X���|�
��,4X�ISP�>�r
������c�!X�XV�L�rG<#;GNwI�5���cj9�Ñ�s dgf��K�,k����5��D�n��[*��!���Qpr���D�l�g�9�B����?T�$�j:�i/�HԈF�B���+���Љ�38�F�Ud�^�iD(l�i�����(7�;@m+�v2��͗{rY��Ú2V���(���Eb�-���\;}�|�]M���xJM#��y��fpG(}��8�� TZ����Z���?�tR�cA��="x�����,�;(-ɆL�0X��p�`�#ʯV��b�%��DWNՊ��jÚ�,}rﱼ��W�(_���?s,���%���q�L��u�w�c�jgj��#��K�����Xja�T��=?�cfƺ�\K�Y�]�у��`B��uF��� ��_O#T��9���.Aa;ؿ%2� �����y��YG���V�����}ތ���k^���l,5H�O}�U&Κ�Pa�T������{�TЧ��S�e1=��t��,vf�����I|�)��j���?�u:��m�V&Q���D4�1�������.P��.�{_��y�g�����y�>Oa�TbP��Z�E
�~��=)x�����e�ff���*6SNJ�wV���&�l)��K@�l�S�u3a�jS!W�#C��؊�kl�G�Җm�
�����z^=v��Г�R�U�4��q�����55M(�dIC���tv+Lj�ȳ����U�2��b�����(X%��_M#�����y�{ei~�VZvs##cvߛ9���e���&��RՌsL�-զ?[�*E�����^��-��qd��T���u�3μĕ����ڒ�����ee,A(k#Ϸ#O<�+��nY`�8����X�2I���S�ܱ�����ߗ�k�[n\��3�l�pSs�,�^��[���`)mѴ�W��&�%�@�PYٞ�7N�U����Y�#p�����W�:����׳[dQ���WN���-��Pt���?:����ѿ�*UM�s5҂m��e$��G���C�����;���iT��mQY,LL�9�;�q���*P�)�<�^CG���)~*2�x�Đ�cn���s�sb���.n`-����!ٹ�<��*�����!�����ţ/��nk��³Z>���Ū��
�q��:9��t1+*����v}�{/ޅ�R�0��LΫ*P���D��kۯ��.���KZw~rW�{�ݷ�x͚�����
�訙�Hۣ���������;5�""k�S�?���غ��j4��.P�jBv.̃#V����=f`t����_���'p�����d��?w���h�D��}��':G�����S��3a�%�z�6O8o����VG{�t�uw�c*�e�i�]���m�&O���{�G�WO?��0ܰ�b
�[�r�r�*,՜d�Lv:�C��c���8��>���!xq��_i���
�.�}�\�����qõ+��w��[25�%���t��|ٔt4�����XeO����?��N�����n��ː��ԭGsrgXw�jKmZ_�eYKr�;��t��]+���F�S5zmMBKh1�˓˼ *5W�ȧ������B:k�G���t=��@7�����]�i���_�됽ـumL����:nZ�o��$��$����jD@k$⺱jY�6����\�q�ͫ)�1Ӷi�vX�4inx����Gs�:s>���.��F�o���"js�=���O�r�>[Y��۷|w�FS�@�|��W��:6���IEND�B`�././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/data/org.bpython-interpreter.bpython.desktop0000644000175000017500000000036514254577175022525 0ustar00useruser[Desktop Entry]
Icon=bpython
Name=bpython
Comment=A fancy interface to the python interpreter!
Exec=/usr/bin/bpython
Terminal=true
Type=Application
Categories=Development;Utility;ConsoleOnly;
StartupNotify=true
Keywords=Python;REPL;interpreter;
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/data/org.bpython-interpreter.bpython.metainfo.xml0000644000175000017500000000407114254577175023453 0ustar00useruser
org.bpython-interpreter.bpython
CC0-1.0
MIT
bpython interpreter
Fancy interface for the Python interpreter
bpython is a fancy interface to the Python interpreter. It has the
following features:
- In-line syntax highlighting.
- Readline-like autocomplete with suggestion displayed as you type.
- Expected parameter list for any Python function.
- "Rewind" function to pop the last line of code from memory and re-evaluate.
- Send the code you've entered off to a pastebin.
- Save the code you've entered to a file.
- Auto-indentation.
org.bpython-interpreter.bpython.desktop
https://www.bpython-interpreter.org/
https://github.com/bpython/bpython/issues
https://bpython-interpreter.org/images/8.png
https://bpython-interpreter.org/images/1.png
https://bpython-interpreter.org/images/2.png
https://bpython-interpreter.org/images/3.png
https://bpython-interpreter.org/images/4.png
https://bpython-interpreter.org/images/5.png
https://bpython-interpreter.org/images/6.png
https://bpython-interpreter.org/images/7.png
bpython@googlegroups.com
././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/doc/0000755000175000017500000000000014361765332012457 5ustar00useruser././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1674046170.1340353
bpython-0.24/doc/sphinx/0000755000175000017500000000000014361765332013770 5ustar00useruser././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1674046170.149035
bpython-0.24/doc/sphinx/source/0000755000175000017500000000000014361765332015270 5ustar00useruser././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/authors.rst0000644000175000017500000000025614254577175017521 0ustar00useruser.. _authors:
Authors
=======
If you contributed to bpython and want to be on this list please find us
(:ref:`community`) and let us know!
.. include:: ../../../AUTHORS.rst
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/bpaste.rst0000644000175000017500000000050114254577175017303 0ustar00useruser.. _bpaste:
bpaste
======
bpaste (http://bpaste.net) is the pastebin which we run for bpython. bpython is
configured by default to paste to this pastebin.
Removal
-------
If you want a paste removed from the pastebin you can use the removal link as
shown by bpython. Refer to https://bpaste.net/removal if you lost it.
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/bpdb.rst0000644000175000017500000000061614254577175016743 0ustar00useruser.. _bpdb:
bpdb
====
To enable bpython support within pdb, start pdb with the following code:
.. code-block:: python
import bpdb
bpdb.set_trace()
This will drop you into bpdb instead of pdb, which works exactly like pdb except
that you can additionally start bpython at the current stack frame by issuing
the command `Bpython` or `B`.
You can exit bpython with `^d` to return to bpdb.
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/changelog.rst0000644000175000017500000000006414254577175017760 0ustar00useruser.. _changelog:
.. include:: ../../../CHANGELOG.rst
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/community.rst0000644000175000017500000000172614254577175020063 0ustar00useruser.. _community:
Community
=========
Do you need help with using bpython? Do you want to thank the contributors
personally? Or maybe you want to help out, contribute some code or resources
or want to help in making bpython known to other persons?
These are the places where you can find us.
IRC
---
You can find us in `#bpython `_ on the `OFTC
`_ network. Don't worry when you get no response (this does
not usually happen) but we are all from Europe and when you get to the channel
during our nighttime you might have to wait a while for a response.
Mailing List
------------
We have a mailing list at `google groups
`_. You can post questions there and
releases are announced on the mailing list.
Website
-------
Our main website is http://bpython-interpreter.org/, our documentation can be
found at http://docs.bpython-interpreter.org/, and our pastebin can be found at
http://bpaste.net/.
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046093.0
bpython-0.24/doc/sphinx/source/conf.py0000644000175000017500000001600314361765215016567 0ustar00useruser#
# bpython documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 8 11:58:16 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = ".rst"
# The encoding of source files.
# source_encoding = 'utf-8'
# The master toctree document.
master_doc = "index"
# General information about the project.
project = "bpython"
copyright = "2008-2022 Bob Farrell, Andreas Stuehrk, Sebastian Ramacher, Thomas Ballinger, et al."
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version_file = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "../../../bpython/_version.py"
)
with open(version_file) as vf:
version = vf.read().strip().split("=")[-1].replace("'", "")
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
unused_docs = ["configuration-options"]
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
exclude_trees = []
# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = "nature"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "logo.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = "%b %d, %Y"
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_use_modindex = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
html_use_opensearch = ""
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = "bpythondoc"
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
# latex_documents = [
# ('index', 'bpython.tex', u'bpython Documentation',
# u'Robert Farrell', 'manual'),
# ]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# Additional stuff for the LaTeX preamble.
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_use_modindex = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(
"man-bpython",
"bpython",
"a fancy {curtsies, curses, urwid} interface to the Python interactive interpreter",
[],
1,
),
(
"man-bpython-config",
"bpython-config",
"user configuration file for bpython",
[],
5,
),
]
# If true, show URL addresses after external links.
# man_show_urls = False
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/configuration-options.rst0000644000175000017500000002254414254577175022400 0ustar00useruserGeneral
-------
This refers to the ``[general]`` section in your
`$XDG_CONFIG_HOME/bpython/config` file.
arg_spec
^^^^^^^^
Display the arg spec (list of arguments) for callables, when possible (default:
True).
auto_display_list
^^^^^^^^^^^^^^^^^
Display the autocomplete list as you type (default: True).
When this is off, you can hit tab to see the suggestions.
autocomplete_mode
^^^^^^^^^^^^^^^^^
There are four modes for autocomplete: ``none``, ``simple``, ``substring``, and
``fuzzy``. Simple matches methods with a common prefix, substring matches
methods with a common subsequence, and fuzzy matches methods with common
characters (default: simple). None disables autocompletion.
.. versionadded:: 0.12
brackets_completion
^^^^^^^^^^^^^^^^^^^
Whether opening character of the pairs ``()``, ``[]``, ``""``, and ``''`` should be auto-closed
(default: False).
.. versionadded:: 0.23
.. _configuration_color_scheme:
color_scheme
^^^^^^^^^^^^
See :ref:`themes` for more information.
Color schemes should be put in ``$XDG_CONFIG_HOME/bpython/``. For example, to
use the theme ``$XDG_CONFIG_HOME/bpython/foo.theme`` set ``color_scheme = foo``
Leave blank or set to "default" to use the default (builtin) theme.
complete_magic_methods
^^^^^^^^^^^^^^^^^^^^^^
Whether magic methods should be auto completed (default: True).
dedent_after
^^^^^^^^^^^^
Number of blank lines required before next line will be dedented (default: 1).
If set to 0, automatic dedenting never occurs.
editor
^^^^^^
Editor for externally editing the current line, session, or config file.
.. versionadded:: 0.13
flush_output
^^^^^^^^^^^^
Whether to flush all output to stdout on exit (default: True).
Only relevant to bpython-curses and bpython-urwid.
highlight_show_source
^^^^^^^^^^^^^^^^^^^^^
Whether the source code of an object should be syntax highlighted (default: True).
hist_duplicates
^^^^^^^^^^^^^^^
Whether to store duplicate entries in the history (default: True).
hist_file
^^^^^^^^^
History file (default: ``~/.pythonhist``).
hist_length
^^^^^^^^^^^
Number of lines to store in history (set to 0 to disable) (default: 100).
paste_time
^^^^^^^^^^
The time between keypresses before pastemode is deactivated in bpython-curses (default: 0.02).
pastebin_confirm
^^^^^^^^^^^^^^^^
Whether pasting to a pastebin needs to be confirmed before sending the data
(default: True).
pastebin_expiry
^^^^^^^^^^^^^^^
Time duration after which a paste should expire. Valid values are ``1day``,
``1week`` and ``1month`` (default: ``1week``).
.. versionadded:: 0.14
pastebin_helper
^^^^^^^^^^^^^^^
The name of a helper executable that should perform pastebin upload on bpython's
behalf. If set, this overrides `pastebin_url`. The helper is expected to return
the full URL to the pastebin as the first word of its output. The data is
supplied to the helper via STDIN.
An example helper program is ``pastebinit``, available for most systems. The
following helper program can be used to create `gists
`_:
.. code-block:: python
#!/usr/bin/env python
import sys
import requests
import json
def do_gist_json(s):
""" Use json to post to github. """
gist_public = False
gist_url = "https://api.github.com/gists"
data = {
"description": "Gist from bpython",
"public": gist_public,
"files": {
"sample": {
"content": s
},
},
}
headers = {
"Content-Type": "application/json",
"X-Github-Username": "YOUR_USERNAME",
"Authorization": "token YOUR_TOKEN",
}
try:
res = requests.post(gist_url, data=json.dumps(payload), headers=headers)
res.raise_for_status()
json_res = json.loads(res.read())
return json_res["html_url"]
except requests.exceptions.HTTPError as err:
return err
if __name__ == "__main__":
s = sys.stdin.read()
print(do_gist_json(s))
.. versionadded:: 0.12
pastebin_url
^^^^^^^^^^^^
The pastebin url to post to (without a trailing slash). This pastebin has to be
a pastebin which provides a similar interface to ``bpaste.net``'s JSON
interface (default: https://bpaste.net).
save_append_py
^^^^^^^^^^^^^^
Whether to append ``.py`` to the filename while saving the input to a file.
.. versionadded:: 0.13
single_undo_time
^^^^^^^^^^^^^^^^
Time duration an undo must be predicted to take before prompting
to undo multiple lines at once. Use -1 to never prompt, or 0 to always prompt.
(default: 1.0)
.. versionadded:: 0.14
syntax
^^^^^^
Syntax highlighting as you type (default: True).
tab_length
^^^^^^^^^^
Soft tab size (default 4, see PEP-8).
unicode_box
^^^^^^^^^^^
Whether to use Unicode characters to draw boxes (default: True).
.. versionadded:: 0.14
import_completion_skiplist
^^^^^^^^^^^^^^^^^^^^^^^^^^
A `:`-seperated list of patterns to skip when processing modules for import completion.
.. versionadded:: 0.21
Keyboard
--------
This section refers to the ``[keyboard]`` section in your
``$XDG_CONFIG_HOME/bpython/config``.
You can set various keyboard shortcuts to be used by bpython. However, we have
yet to map all keys to their respective control codes. If you configure a key
combination which is not yet supported by bpython it will raise an exception
telling you the key does not exist in bpython.keys.
Valid keys are:
* Control + any alphanumeric character (C-a through C-z, also a few others).
* Any function key ranging from F1 to F12.
backspace
^^^^^^^^^
Default: C-h
Delete character in front of the cursor.
.. versionadded:: 0.14
beginning_of_line
^^^^^^^^^^^^^^^^^
Default: C-a
Move to the beginning of the line.
.. versionadded:: 0.14
clear_line
^^^^^^^^^^
Default: C-u
Clears to the beginning of the line.
clear_screen
^^^^^^^^^^^^
Default: C-l
Clears the screen to the top.
clear_word
^^^^^^^^^^
Default: C-w
Clear the word the cursor is currently on.
copy_clipboard
^^^^^^^^^^^^^^
Default: F10
Copy the entire session to clipboard.
.. versionadded:: 0.14
cut_to_buffer
^^^^^^^^^^^^^
Default: C-k
Cuts the current line to the buffer.
delete
^^^^^^
Default: C-d
Delete character under the cursor.
down_one_line
^^^^^^^^^^^^^
Default: C-n
Move the cursor down, by one line.
edit_config
^^^^^^^^^^^
Default: F3
Edit bpython configuration in external editor.
.. versionadded:: 0.14
edit_current_block
^^^^^^^^^^^^^^^^^^
Default: C-x
Edit current block in external editor.
.. versionadded:: 0.14
end_of_line
^^^^^^^^^^^
Default: C-e
Move to the of the line.
.. versionadded:: 0.14
exit
^^^^
Default: C-d
Exits bpython (use on empty line)
external_editor
^^^^^^^^^^^^^^^
Default: F7
Edit the entire session in an external editor.
.. versionadded:: 0.13
help
^^^^
Default: F1
Brings up sincerely cheerful description of bpython features and current key bindings.
.. versionadded:: 0.14
incremental_search
^^^^^^^^^^^^^^^^^^
Default: M-s
Perform incremental search on all stored lines in the history.
.. versionadded:: 0.15
last_output
^^^^^^^^^^^
Default: F9
Shows the last output in the systems $PAGER. Only works in bpython-curses.
left
^^^^
Default: C-b
Move a character to the left.
.. versionadded:: 0.14
pastebin
^^^^^^^^
Default: F8
reimport
^^^^^^^^
Default: F6
Reruns entire session, reloading all modules by clearing the sys.modules cache.
.. versionadded:: 0.14
reverse_incremental_search
^^^^^^^^^^^^^^^^^^^^^^^^^^
Default: M-r
Perform reverse incremental search on all stored lines in the history.
.. versionadded:: 0.15
right
^^^^^
Default: C-f
Move a character to the right.
.. versionadded:: 0.14
save
^^^^
Default: C-s
Saves the current session to a file (prompts for filename)
search
^^^^^^
Default: C-o
Search up for any lines containing what is on the current line.
show_source
^^^^^^^^^^^
Default: F2
Shows the source of the currently being completed (python) function.
toggle_file_watch
^^^^^^^^^^^^^^^^^
Default: F5
Toggles file watching behaviour; re-runs entire bpython session whenever an imported
module is modified.
.. versionadded:: 0.14
transpose_chars
^^^^^^^^^^^^^^^
Default: C-t
Transpose current character with the one left of it.
.. versionadded:: 0.14
undo
^^^^
Default: C-r
Rewinds the last action.
up_one_line
^^^^^^^^^^^
Default: C-p
Move the cursor up, by one line.
yank_from_buffer
^^^^^^^^^^^^^^^^
Default: C-y
Pastes the current line from the buffer (the one you previously cut)
CLI
---
This refers to the ``[cli]`` section in your config file.
suggestion_width
^^^^^^^^^^^^^^^^
Default: 0.8
The width of the suggestion window in percent of the terminal width.
.. versionadded:: 0.9.8
trim_prompts
^^^^^^^^^^^^
Default: False
Trims lines starting with '>>> ' when set to True.
curtsies
--------
This refers to the ``[curtsies]`` section in your config file.
.. versionadded:: 0.13
list_above
^^^^^^^^^^
Default: False
When there is space above the current line, whether the suggestions list will be
displayed there instead of below the current line.
right_arrow_completion
^^^^^^^^^^^^^^^^^^^^^^
Default: True
Full line suggestion and completion (like fish shell and many web browsers).
Full line completions are displayed under the cursor in gray.
When the cursor is at the end of a line, pressing right arrow or ctrl-f will
complete the full line.
This option also turns on substring history search, highlighting the matching
section in previous result.
Sample config
-------------
.. include:: ../../../bpython/sample-config
:literal:
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/configuration.rst0000644000175000017500000000060214254577175020676 0ustar00useruser.. _configuration:
Configuration
=============
You can edit the config file by pressing F3 (default). If a config file does not
exist you will asked if you would like to create a file. By default it will be
saved to ``$XDG_CONFIG_HOME/bpython/config`` [#f1]_.
.. include:: configuration-options.rst
.. :: Footnotes
.. [#f1] ``$XDG_CONFIG_HOME`` defaults to ``~/.config`` if not set.
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1674046108.0
bpython-0.24/doc/sphinx/source/contributing.rst0000644000175000017500000001035014361765234020531 0ustar00useruser.. _contributing:
Contributing to bpython
=======================
Thanks for working on bpython!
On the `GitHub issue tracker`_ some issues are labeled bite-size_ -
these are particularly good ones to start out with.
See our section about the :ref:`community` for a list of resources.
`#bpython `_ on OFTC is particularly useful,
but you might have to wait for a while to get a question answered depending on
the time of day.
Getting your development environment set up
-------------------------------------------
bpython supports Python 3.7 and newer. The code is compatible with all
supported versions.
Using a virtual environment is probably a good idea. Create a virtual
environment with
.. code-block:: bash
# determines Python version used
$ virtualenv bpython-dev
# necessary every time you work on bpython
$ source bpython-dev/bin/activate
Fork bpython in the GitHub web interface, then clone the repo:
.. code-block:: bash
$ git clone git@github.com:YOUR_GITHUB_USERNAME/bpython.git
# or "git clone https://github.com/YOUR_GITHUB_USERNAME/bpython.git"
Next install your development copy of bpython and its dependencies:
.. code-block:: bash
$ cd bpython
# install bpython and required dependencies
$ pip install -e .
# install optional dependencies
$ pip install watchdog urwid
# development dependencies
$ pip install sphinx pytest
# this runs your modified copy of bpython!
$ bpython
.. note::
Many requirements are also available from your distribution's package
manager. On Debian/Ubuntu based systems, the following packages can be
used:
.. code-block:: bash
$ sudo apt install python3-greenlet python3-pygments python3-requests
$ sudo apt install python3-watchdog python3-urwid
$ sudo apt install python3-sphinx python3-pytest
You also need to run `virtualenv` with `--system-site-packages` packages, if
you want to use the packages provided by your distribution.
.. note::
Installation of some dependencies with ``pip`` requires Python headers and
a C compiler. These are also available from your package manager.
.. code-block:: bash
$ sudo apt install gcc python3-dev
As a first dev task, I recommend getting `bpython` to print your name every
time you hit a specific key.
To run tests from the bpython directory:
.. code-block:: bash
$ pytest
Building the documentation
--------------------------
The documentation is included in the bpython repository. After
checking out the bpython repository and installing `sphinx` as described in
the previous step, you can run the following command in your checkout of the
repository to build the documentation:
.. code-block:: bash
$ make -C doc/sphinx html
Afterwards you can point your browser to `doc/sphinx/build/html/index.html`.
Don't forget to recreate the HTML after you make changes.
Hacking on the site or theme
----------------------------
The site (and its theme as well) is stored in a separate repository and built
using pelican. To start hacking on the site you need to start out with a
checkout and probably a virtual environment:
.. code-block:: bash
$ virtualenv bpython-site-dev
$ source bpython-site-dev/bin/activate
$ pip install pelican
Fork bsite and bsite-theme in the GitHub web interface, then clone the
repositories:
.. code-block:: bash
$ git clone git@github.com:YOUR_GITHUB_USERNAME/bsite.git
$ git clone git@github.com:YOUR_GITHUB_USERNAME/bsite-theme.git
Next you can fiddle around in the source files. If you want to build the site
you activate your virtualenv and tell pelican to generate the site with the
included configuration file.
.. code-block:: bash
$ source bpython-site-dev/bin/activate
# if you want to fiddle on the text of the site otherwise go into
# bsite-theme
$ cd bsite
# if you checked out the theme in a different place, use that path
$ pelican -t ../bsite-theme -s pelicanconf.py
After this you can open the `output/index.html` in your favourite browser and
see if your changes had an effect.
.. _GitHub issue tracker: https://github.com/bpython/bpython/issues
.. _bite-size: https://github.com/bpython/bpython/labels/bitesize
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/django.rst0000644000175000017500000000414714254577175017301 0ustar00useruser.. _django:
Django / Pinax
==============
Django is a web framework for professionals with deadlines. People like to
interactively talk to their Django models. Currently Django comes with two
hardcoded options. Either you use the standard Python REPL, or you use IPython.
Pinax is an integrated collection of Django applications, a sort of Django with
out of the box models and views for a lot of stuff.
For those people wanting to use bpython with their Django installation you can
follow the following steps. Written by Chanita Siridechkun. The following
instructions make bpython try to import a setting module in the current folder
and let django set up its environment with the settings module (if found) if
bpython can't find the settings module nothing happens and no environment gets
set up.
The addition also checks if settings contains a PINAX_ROOT (if you use Pinax),
if it finds this key it will do some additional Pinax setup. The Pinax addition
was written by Skylar Saveland.
bpython uses something called the PYTHONSTARTUP environment variable. This is
also used by the vanilla Python REPL.
Add the following lines to your ``.profile`` or equivalent file on your operating
system (``.bash_profile`` on Mac OS X if you use the default shell):
.. code-block:: text
export PYTHONSTARTUP=~/.pythonrc
This sets the environment variable PYTHONSTARTUP to the contents of the
``~/.pythonrc`` file when you log in.
To this ``~/.pythonrc`` file you add the following lines:
.. code-block:: python
try:
from django.core.management import setup_environ
import settings
setup_environ(settings)
if settings.PINAX_ROOT:
import sys
from os.path import join
sys.path.insert(0, join(settings.PINAX_ROOT, "apps"))
sys.path.insert(0, join(settings.PROJECT_ROOT, "apps"))
except:
pass
And add an empty line at the end. You need one or it will raise an error.
Login again, or execute the ``source ~/.profile`` equivalent for your shell
and you should be set to go if
you run bpython in a django folder (where the settings.py resides).
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/index.rst0000644000175000017500000000074514254577175017146 0ustar00useruserbpython documentation
=====================
Welcome to the bpython documentation files. This is where you
can find all about using and customizing the bpython interpreter.
If you want to find out more about the bpython interpreter you can visit our
website: http://bpython-interpreter.org
Contents:
.. toctree::
:maxdepth: 2
authors
contributing
configuration
themes
releases
community
django
windows
changelog
bpaste
tips
bpdb
simplerepl
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/logo.png0000644000175000017500000004534414254577175016757 0ustar00useruser�PNG
IHDR���X��tEXtSoftwareAdobe ImageReadyq�e<�"iTXtXML:com.adobe.xmp ����GXIDATx��} �Wu�U���3ZG�%Y�d[^066^�Y�[��$���0��H����{!!!�>L�30`�+���&/�,k��K��{z��{_�Z�nݺ�u�H=3]v�k�������r��"�@�!����}Hp��|܅Dl�{���́%J��#�$x �f���mr^^��c�6���z�Qg�c�r���Ľ�B���Į$@۰`��%XP`�o"x�=Eh���H��$3Bί"�$�i9�ɀ$e���ɗ2�*��g�l~�x#7�4��[�Mw��R��$�Rje�R�/��_*O�"BtC���j��5���:�b]��j�f�g�'����ۀ`��9�-�Y:j
g�m0(�+,"پ�^%�; )�^IR���I�{�6��4?�|X��,S��e��J��5��A��6>k��0����8O�t�X/6h�`\1�Q��6���U&��x���.�����'�� 0ue��H�9�
�1���|�E湔L*S���}�Ƿ����?*��5H�JU�M:��<��p��'���8�ܿ��05���W0�{Gm��r�
�GD��:���I�]GR҆ϒ��}����_����wښ�d��8�z�'��am�6����p�)���O��� �u�MҠ3���X��.^�����Xa ��0��TJ#����/|qt�3/���f� ��d����p
p�n��Ͽ�_��z���9Ӭ���=���=!>��:4l\����7?���W���2ekG�`���,' R�χre��(��k�������5�&���ĚͰ�"�m�(�X➇��9�s����:�!�����m�[�����\��
]��o�������*]�^���pL��.*���Ej���Q���՛o�ժ���|Qn6�p8+���5�Pk�Ľ�G�/F�����0~�p�e�'�A$D�N��r:�\��5=>Et������`@���c@��Z}�Uo��/]i��1Z�HG{�ɢ��\����w�d��3���Av���B�=OM �n�3�軈y�������l:�AB�k�S泎 ���+0�6�c����%�md�o��/>���s��N�����T:ߛ�,�]��
����de��Aĺ�:��"=�ןZ�T?|�I��~H�Y��ag�����_�����5FX��E~�1��/+��PU�~��n?��c4<;cG�fl�6�Y���v����J���my�'?@3��9e}ww@p�p��N9�%�5������%sfV(s��'�[^[X��tl�tEo�3���c;�4洓N;B�D�އo��6cd:>b�G�������<�����/��:���$�ݿ�`�v��\$���'��� ���s��Z��w>\J�p)+Ȅx�� �+TⰬ�Y�:�_�:����>�����ѽ��1S6@����:��|����21��N��a0n�/%����0a^^�t@2�X�9�}K�,���si��#�$�hVHX�3G"�� �X�0�Pe�/�&d��Σ���Gls�d2`��W+�(��!)$Rgi��5���`��"s >�9S�t�F�I�2�7}��S�=~�
���r�mf�?T̡�^:�Y���ث�n��!�af�ಽC����Й��>�n��! ��B��ם`M�:s�7w�~�>6h��=�{�:��<���ze�ؘ�W�͛b�*�i��Z���^����W+��)
�Kk�� �P��.�ID�h��J� ���4�p"�
��;b�c��2M�Ƀ�Pe�ֹ���[sz��ME��II����y����'���}@��_x9���?!���$87��\��!t�a�W9�I-�x�zݜ4�P�HJ*
~Z��2�L,:���W�[�+"�I�vH��Zq�T~`@��N0��^�����{x_���Z@����K_[�,
�l�̿��yG{�3
b�� ٟ�K"�x��4��˘I��{B�oĉF��Wm^���+^g?����0����t�ֿ��ߖ��?�,�:��$��u�z��IR<��p�O�L��\D8�G�w�&���j$~�Z`Յ�\ڳb�F[Cм��`��h��7�f���>@LF����;�c�j3�e�Y�~BR�8��A�]d� �v�|�d��θ��dٙo|���l�A���C���I���m����f���?&$��kw��&K+�M�ۖv��)Uȓ^N���9��\g���\w��\Ӻ��a�ܨ0g��$���e����7~����w?�d�8�ryrd_~px(�;�j`���.�|�DSs����d�_����=�e�DLM��E�M>�|<(+ח,+�I������%"��E`�&_���g��[�������� �23�.�R�MQp�j�s��}x(z֝ei�Ēe>������ek.@,�̩����$sT��=WfvZ�e���V-S{J�ҹ�\�0D#wZ��Ԫ �:����q��2�}�,0~o|x
:�����܀����QN����A�=tM5���H����P`- '���(�)����OqY��pEd�^�+q
c@ڋO���:����눃�}�l�e����&rp��BF^������/�/�F@�LɌ���� �� &E������AL-"�8a���
��f�
g�A$��D�[o8;(3 "s{�R�9@��A�s��r��$�!5$@���j��,��ID� ��uS]�F;�e��>�kx鲗�^��G�꽠*AN��jDX%�'�#��T2&�F�!�$��|IA�:`�/N:q4��U��5�BpV.h�E���m��{2j�{urv? ���zI�C��w�H{--�QH�g�pi ����D0��
1'�I9{SJe�,�����"1�b�xv[���ے�%���p:R9����d�bI����9A���dyg���Xc�D@@�V7m<�)�._�с,���>~��@��Ь��T�
r3�H�M��o��La"d�14��V?B�!�mX�8>�7��
��t������Sv�uw�O���Y��s\�I��p�G\VE�
{u����?i��,��q6i�V�N����@X�ʸY�A���՝e��|�:�A/�řZ<� /��\k�%wX[L:�eF���U�aN�f;a����xp�(g��^B�����AL
���ϛ;(�G��)��B5��RE$8zu�.# �癶�V�9��l�e�ZDc4��{����B�;L[��0���5
�evb�fd�!�O#��@�M8t��$�1��/�������#��m�1c�c��C)*���5�iA0�����xH���ظ\ ��茶��8��Y�b!�_� g1��;���D��# ��uL>D�����Kϼ��U\�;Z��Z:K�5$_���� ���I�X1a^ ����T�hllzk�ͮ�L�,�^!�yb��Zmת��Z�,�8r��^)O��c�Ok���y�Vy0kֱ�!��@(-�AS{��P����r�Y�w�]W�����뻖��V�2NW�X]v}m��+���-5BLG�ܽ{�o�����/���^W�*�]Չc�?��m����6}t���J������]�y&�}�9�Y�=��&+�N���=n6�6q;�1���r*�e5AP�$��?��̋��t's
�X8�=�A
D�(���Բ�ͧ��X��������~hd����yn��Qj��
}��Y�pfP��œ�^'�;QH��&��m�@�w0Y�Gf�u]`�N���6��#u���8����a4�� IR���-oZw�%��#4��S?��n�0�lM���
b�
�V�bY(!)8�H�i!���#{
�r ���jtV.g势O�t� ��������A��@���T�o���/��-�>��7�3��^
�D��,��,x";��p~���E���{wf��>K�{��U#���Q$�$8��/�Y��Ĉ/�\�?����N���L~��+��?.��?eɩ�C%�sz%:�J�"z�$��"Y8�f�2��KԻ����^����*A6X��ʅЬ\A�`C$�$����}DdtA�!�-�kU�^��u�y��|i�o��I��Mr�m�`A�ʂ����l���IX0b {�!��+��E�|Cy���!�ǘK
ʘ&��fΩ�m�+,;�ݟ����sB���\�/ �鱕6f��r�ADZ-� 1y
�%b�
�i�*����I�u���H���C{�۹MW~�c�~��7�fV�����tҴS`n��
�w��l`�͚*���Ͷһ#�u� �Њw�932�ig��)2�I�1%���Z�[�~���.��1���m.��H�c� 3B҃b�
B��$�Kc$��O�ť�nTھ%�v�Iʜv��?8t�٧�K��ގ��%�l��� ����3�u�����(W���QHc�a 3�(���݉3݃KO��C���-^^bn�,��$0��O$E���p���_��k"�� # �vA��i'
:�$܉�v{�je�_���%�^p�
�<�(�i��N�\�ϱ\x��+y�'���$���!_�B���O��WL����!�1
B���
��7b��=~q 3�5t
V]p�%�B�r 9 &�+���&!���k/�1�[IQĕ���ML��X[���~�XSͶ&y�t�
}+7�5�v�f N�WYH�z��P����L�GxBD,k����D"|�xN����eD9�$�i��']��7�5/�8�l��@zUN{X�QX$H<�z>1wUþ�D���;���i'aN{x�.��!����4Qa��Fc�+�`Zĵ�i�1 �Q��,��yRS��OlK���=�D�p3~�6��#A�5-!�&!$�n�I�����Ɛ�t�{��]n�E^���f?�o&=H��Ċ����@bi�j �� w��M� ӆ����+R'������S}�6��V^�dL+s~iY�mK��5$���������C�[z��܊O� 1+���@ɫ"���M���K0��v�I�
�?���A�Ey��)����5�qRRr~��rp�_+L$kA8� (Thh�U��jD����%u���H2�l��yD��b�3��W�c��oL5����Hx��){.H ��[he�#\]��7�����R:�٠N��?�����jk_�]y��5�@������Kz��R
���AF���-��[P�ʅ�;
�u_����Lc�����}<96���<:���7��
e���9��َZ;҇ݓ�h?���gL1-_Oi����Lߢ���S�W.�1?4��R��D�Go������#�S��5�d�g�J-h��Ȝ"-����#o3|%�f0��,%���qc=f��N�Q�)[�#���Y=(���J�m=�����X��
��ܴJR2�U!�YlG��a��jĒ�x�d��5� ��:�Fi�g瞅
7�x����&�&�I���9�˺#(0���EP��U�Zej�#?9z��_�f������w��w���tB�S�!5���|E�2�*Ir�1�2̊���j�Ṿxһ�
��9�q��אKZ
��$�#�u=�/�����j�Q2�� -%��O �u�qk�ڡ����训�6_���[�ᵯ!�j���?"v���7�}�@2M,�V=k�5���,��s+:�i�B�,!Z���l �j�i��{�3&�����g)Cdu?p�{�4M��@ĕm�����yP�W3y��ԩc�����M��7��$��1�7�C�B���)9c<��L>��tE6<$I�JT$ �$t��\����Ő�����h��k����ZEհ���K�I��v�,�l
sڣ̆��:g�����[z����J�y���3l8�u��]d�R))E�Ҋ�d��%$SB0CjR���$���lnֻ��8Ґ(�d�@C��q}�J?=ư`�?�/���jՅ$b�R�B�c�UM�kUM��4�T��ũii~Y�ä]H$2�N�o`�� y�vM�0��{���p㻖/Җ/)�K�ԁ���Օƹ�BR�d>�٦!�x�L&<"��$��K9\�Xv����639U+�<����{ܿߡ���:��Z�k�y��*3�aF�����"�8�6!g6��E�
�g�k����7�g��A���1�IH��]P�ð�D�`B��`��k:�T���LY��b
&Ƨ��=��ѩs!M;��_�_��c\'b���R!���q�|![8����/뇥�04����4�)H+���G$A]
a#b��|��p��>8������ߢW��w�➽�>����ߵ����F3�]�
��� ��c�4ҁ��P'�$A&�i�LMV4��R5����wd�ǖZl�N��N����`h/��˰��<[��d��"a�U,v��B��5�Nc�7W�n+L��� ,�+n��ؖ�N�Y�攓�~dž��~���|��M;���ݷ~����tQ���`(� ���m�>�&I
��T����%R{�$�ul)~�P�{��J6�*����z%H��d$�^A!��L.K��PP�&)?�Z@�!8ݟ1�0�xZ�@�G��0�`ڐ�UZ��{�����}���?<�-���V>[<+,s���O�T���aѯeN|��-�v[�H�z,R�P��p�L��Ӳ*�d���qk�E֟x`!�Al_�|��i��mI#b�jc]���̛�r�W�{�>�lQ~\��Q���K-���6yCB��}��� &@�4��o�k8�P�P�8��!���U��؉��Kz'�U��9u$���N���T�C�\��7�@�єk�q�;��7����-�dk�0���+[t�S|�V�����
�5�uL�B�b���?�&��R�y�@cϖ���eL��fL�-t�C�O�����ڋ58������7.��;�X�P����-3�Zfb�Y�i�Ϝ,�ad��șC���d�@�0jAD0�������!{���˫ՐS$>8DD%
��V��/��e.?��I��/�:�&����L�l�S��tߍÎ>۳ 4ʊS�#��1�IV�Ja�}�u`�t� G� H����(}I��������?���u�Ҧ� 8+�9�'�J!A��l�I��ǜ�$4�%1��X%�aϐ�x��!ـ@>�Oub��'�\{/\*:l��ڿ~����{ҋl�����q�e��Z�IB���%��昙U�qeO���|/II�� E���iD�"l^�K\у�^<|����w��U7gj5���2���v�1.|@�9�A<���?YM���&�Ʀѩ��%E̚S2_?���u}�_�t��*L��Z���X'ZpHD��u��+�x0Ոf��d�!��؉H�EϐX��f��,ه�kE
|3Ny�kX��o�tI*%�3~��� :�i��6�/
��E3B�tA/��%!�@R��B� Ϸ�C��xNy�vQ1�洁���C�/�>a�ʤv c��n�sY�X%��C`-"�N��0�1��f���ϗIB7�p����58��۟���N���o"w�ج;�%<.QO�1s�� Y>���H�k����!Aѩ�(T�pm��棈�##���������'
O��^��i���Q�UH!s�:Sb�O[I��9�mb!��bv�2ɢ�r|��e���XD9q>Hl��D��Ґ3���<��e��#���!Y���G��2x���ǂsl�a#|�����d��6��n%}����b�
��G�`;��s��L�������_o�8'6B����#���%E&(B��!f��B^I�Z���@���9A�������O�j:|�e6�ݼ[�!Ś��t�-�Ki]AC^c�,[���=�*���ЕOAw!
RָA'���d�G5n��Y5�A,#ȕ@�F�e����l/x�Ϥ� s��ŸM�m8��w�O��{�yE�4J2b���tw�&C`JT,7�v�{7�9Z�Ai��n�;����ev��Jgl�A�q�^��7?���S�L��WKn8��c̸A<�,Y�3��Fl�`$�l���O�)ښM���O�����������v��dmꖿ��TJ�E��M+3��ڏ�8�#���l��mWG���}h��1�4�`z��v��9���t�ɋO��-�V *��>�J�0�$�̵gl�L3�u�I{�����(��w~������w!#%�LR��{�[=���=f�}5�=
��K�L��r��}�I�#L�AL� �����~��-��b��ye��/Ǟ�e���qϾ'�*3iB��F�s��bYn� "4+i�!ӶA�m\_
�h�@ƞ�K���r��������K/&���O�$"c5��j��ȡ-1~]KO>?��]w��9�`Q�mZ;�!���v�A��׆���Ld�����h\o�I��m����������R��XY���W�-����cGa@²���aW�y�
�*3�E�з���nLIT�Hb�V\�0�9,ȒHl��r&�}�,�s��>��[��I%߳l���q�s�He{rX�R���H� �H@��О�~I���ڨ���>���Du�6Yۯd��%�8�#o��n�3��!�ҹl��j)�0��"���F���3�YXӎ�
5M�dW�5���E��<3۷dp]�����[�S�j��GH���� ��U+�(M�C;&��{���/;���r�} )�sN�I�,LX�#���@�0r0�^���9�WŞD4GaC���75%H��wz���&6����Q��`λ����vM5��P48�H 0�H[�ik3��B�+/�m�Y>�<��*Ao�*�7��#ԲҪ�j�8Q��9��6!鴌Bh�B"Z���B���X ym�0a�7�`�`\�G�8�=�Όd�R��bF~�P���L6+ɋӲ��.TcDXs���D���A��R!�v�t�0aYV�>,C� ���2��?�KP+�Wj3�E&z�Cc��<�h��3J_WZ10Б�~�����EI 1�G�W�&v`�lS �O�hݨ�X�f��*���i��.��B>�&��`��v��%B�$&NjOpX��;�Z?�f$��ț/E���i^Վ<��s�`�
�99��J���T�S@oj5�!?} qYn�{�a\R"���G�P�x�2╡�cL�q܄I��,kf%��/���J&-�B�4bqٿ��ӵ�9�<@�K����o"�{0�f�9���M7���L��#Ԝ3dw��79�ɯb�&~�锔2V��gJ4܉`J1�lM���?�d�>�x�D(��g��#��$%3#{z���J4tR�k8��I)HQn.� %AD�� ���D$)@��Ċ���r�%����yٜ>{��ojʼn��f�V�Y
BYR�U��ڍt�ݳ1�Ϊ*V��r�'%����`^�cNqf!|�M�Le������I�±��~��_?e��!�(37)x����ùq�r"��O� .U�wp�t��A����s�R�!6�( ��I� +�ΌW�?���Ze܂'��r�����21�!S������4+��r$�LI$Q����0�C���G��D�? Q.Z������?~6����(2&V��G%��$ڙ��;�Q�*����X�*��Nk>���0
rEBģQHL���v3�j�{���=��/�����N�ˁŚWIR߅O[2��$�S�P� xbR���l�$\�aӉI5!�#�|a
�p}>�U�ީAu�o�2����=����VY�8��yլ��D1Ԗ8�6 NH�d��T*�>2^���+_��W4:�Ϥ�n9&(��G\%�Ӎ�n#%M�I�W��������w�fg-8�M�l��ݸ%��*�9�8Z�*U���ժ�^���rғ����6�"V��/�µʴ-�e��cRUZ�#��0�m�Iݫ>����´�)'1�n�YU��Ǖ�����O���Z���ZI���!��&����3�t�'"�ٮ/�leD�5�,)�H�b��s�*�aD�,Y,�I����'O:���3�L��ȍq�����Ͻ<��T�T���TI�jG3���98Y_���J���jk5c���#cjyz�rY�*�Ā�ϵb[�7gh�h&��g>|�u�.e�فJ(� Z��cL�[��P=}��|�D������.$I�`�3�ǐۂ���C�M�ĩ��,%�I�Q������6�%���0h1�Zezf����\ؕm�Û?|j�S&��rT��q��$Dv�0MD&��P��ϼ�=ן�a(5
� ��{,%+j6��(@��a�����ದk��4p�u�4��lܔu���;ԣ�|F���9�~� ����f
�� �Y�6��O���A�2�PXP�����g���#qݮ
d>�g�����h�ǡ��#�f���>���������~�=]�G:��h3>q��w燣�ڭ+���#���#�q&f2n�G�j����M��}X�\�������o���s��o���5o�tj�%��P�y��U4xt�J���<�E����ۡ�W����u�f����
5��ɬ���V���J�d
ܶgf���ˆS��щP��z�4�����c�!��"8>��͈m�K�|�C=���������o��*V����Q��q�o[ӱ�®�r�fl^�1��j��K��e�Z���#�s)~�����Ǯ�|�y_��E�mb�ZSu\�t�i:/M�P�6%5��,!�O!I�J���y�M;�؏�Z�;���[f�5�-���0d��$N��q�q^"�����u��䳩��ܛ�Je̩���P5��SSB�4Nt�2q(u"�,���{K�-�IO�G���D����e������%�%�a�cK��{66!瞟M$�����Jbjb��j
W����v�1�P�ę�1T$�b.=��Fc.�p�\@&���1FM�5��ڡ��ޒ>WC��7s� "a����l^�9���Tj ,�u���h�i��!�h� ��"Ip�I��b|��$o �CC���c�*���9�# �U�D�B��A�ag�,[w����h����H����� L�XfS�NyT�O�>U#��gƏ������i��,d�g�%p�y���tH��k�+�4��v�[�Q�1�{�+zٰ�Dm�07x�
��G��ٰ����X�y�>ɽ���Z�w4yoiz�苕�>�±m��ҔbLb6%��I3���#���~����p@��=�/����4�����@�4�H(8�(a���;i�S���-s�^
�s����6��ܳ*4��M,����>H#���(�J���|B,��A�0[�f3��m?;���JC�N�2OW�(��� '-�6�锄B͟f��b�[���Xj$���ex��#/���O�ڢ�D8����z��mq������ӝ���4`�E�W�v�!��J2��{�=��#���>���?=�M�����
Nt�
O�%������O���(��"�S�ޢ>��d`����Տ~��m}q���!�v�ヴ'����R�#��3����;�r[O�P�@(:�����M�(�K����������_|�g�"�ƞ'�k�2u�$F�X�ߑ$j����.�(�d���Y���c|.IO�V�MQ��J��h�O~��;�rˮ;mp�(�X�*��� ��1�?JN�9��s�S EI�m���a�V�sA��R�Ы3���~|�O�?.���A���;����;2W�$t��Rl�0�wx�e��9U�`O����{k�^<�9����Zg$x���;>�~��3�;l �3�(rѫ��;ih�j��-�_�����H&++.�1�H��֊�tH\j�$ G�ǿ��;~y�m{�(��p!»{�31�C�� ��fLiT�}��<�%ٴ$�3����
F�bk�F�X��y�lutoi�wz⯿���c�py�s�q�y��i³�A�Ӓ��$~�?Y��7nh�d3)90̛4�*V�*���L�dE��U�������;��=�}W��6 �PD�^���N~Hp�&� ��X�1�hC��LƐ"jr`��İU�(����BPp���ɒ�&����%�$�Կ�>\ٶkj���{����Oo��mO���_������54��h������M��uX��
4:Q��৻�l�639]%��Ӫ��:Q,Q�D2^%ds��=@(�2��=�̼yD����|�o�z��e5E���E����-9�!�O ���xO��Z|x�^\�.j3ӵ� ��xef���cc���[g��4���N�a�ۖ�Mgo��X�!��V8� $�wt\��7e�V��3���� X�Eyc��۔���Y�od&{�����adi�tneI���*��r��- ��D��p�|6���mx���\���i1��K��J����y� ��8*�=����X�Gg�&�ƙ ; ���h�=AI~��˘��0Di_^�E�I�ҥ��wӘmq���xw&
}|��&�%�̡"��Wή.,I�rְݻ�ް�Qհﵺ_͘U֩�!����-ԁla�œ_���M�O�J���M:k���L/�Z<�����$;7Bh.�%���{ߑ�>��K
�-���(|
PD(�\�jժ>mx��,#]�eF��T.�!ev ���[ǰ
�,�D�-�g��XF&�3 ��1S�b:����i�߿c�����~�8ѬQ� vz����@g�Л���J]�O.��sye�>���Y�Љ���Jx��S�*6��>��/�����$s6�f� В�+>������̰ij��-=!�B�H=9�k�:=���v���n�u��>�8��(�h�D$I�nB��4���p���U-E,3�a�gMu��6�S�yE��D��I��$��+|�h[�v�P�RUq���>02�n��H#���'�q5G����b����q��گ��ʎ3A�k�y�H��ՀS>[&MC�w�ȼ��NNQ�$��|�b%j��)O�w$� >Hg��W�� �K�
�k�_�wˢF�\ߋ�k�X�7� h
�ȼ3�H��;1��u< �X�Z��R���j���0�@��'2�h>Ȃ�����fI�@���������j��H�85��V,����ݐ3c�,'�����_�����r|!.8 �o��q�rz9&�����;�|����/��ib%��!1Cbr���OP�6+�C����=uף�{ ��#���W�}�X�o}��zh�ş��o/t)f�͠k0
�&Ai!��/|�>H����-a����[�=p�G~�=�g�����&�݈U�L�[/�f�$3���g��SҠ�H����P!҂SM�d�X�$��0�S��+��7j����8��5�=f�Ǹu��_��o���;�>p��ĸ768i�v2w��1�%"��
�������L��Psཱ�f�r|����ػ��Z�5�Rb��O}��[�Պ+���1�k��|����R�l�=�5䴷��.�5t��8V"�mV�!D0�v
Ƕ�'�K�x.�,�j�ԴVoBb���
2"W@��+{�#RI�r�pʓ�b�����l����G�춵������y&P��vy�|D��)��曳��}�h=~�E������F���A���bIs�O~�q�ʼְ��qzr�z�T?YC�I�O�������EB�@���cЅ$G�9�$(`@@���e.]��װ�4���Pz�]�|o�Լz�\o
:���5�����NBU?�dł�lu�M�l' �%#8iea��%nur����UP�٬<m� �T�����
��nb����ҁ;���s�*��)o��#�T�5�=s`�E�.Zkϴ�*�S��p(�>�_:�����]l���ʚ��%�i�@�ye�z�u�;���,M��/AfSx<�^��sp۱ۥ�\C�0�����9���.��e`,�����o���W]x�e�o��
t+L�D��xu�Z�%��W�ڤ�A�x�%=�_�9�葝��@FNP;�]f��-c6�*��%˶���<��
�.{;C5��W���K���E)#��g�9`��7O��9r�:�8�:4�$�ݗ�:�h�g�|v��o|���^w�I�E����h���ވ�I��bե���]��/n��3��wW*�ኊ��zR��,���/���5*+p�z4�S���ï�*�x���Ј�qRe����h���\ϣ?{�w֬�;��lF� �_���'�d�'��O�������;�&j��u�\�8{�$�
��k8���������{��n54���r��x: �v��3`�lj�q�U�vt�<��7����R�:�f��4���t��Г�գ�ܲe`�9�if4
j8�Igode����=8vښCԴf^i�����Y�G���{/���ny�f*�:���w�d�ٸ>N�5����QC�5¹��H!?X*���}�
gv����a��j��ڧ���w߹�6�I��EM8���F��V�8�Β��k��}�c[�w����4�a�;a�y�E��ӵ���ů�����!�Q�%N���"@������q��5���e ���y�E��?��������;�x�Ow�f�[2G�I� ͣ����'����⛇O�FB��Fjv��_?������ķk*+u~�HҶ�̡��a= �h��;?x�W���}#��Q��K� �k)ooB%.�* �[��������L�hGm�1�h�y�LX\�a^��a^�@:�LC�t2-��Rẫ�39��7�1t���z��/�g�[ ��Q�8��I�{hd����uϭ�x���2���s����BgnDf@R�����=���
W��N�:ם2�
0�
]K�:�|sd~�O�����ȷ~������1[KL1k��C*�y���:�� q�]�>'_��$+�(w�
r���_��˗,�/��lͼ��6]��j��D'�p"Nk�@0_iR����hm�W����[�<�u�䁑��ap������h�*�$�@:�'��9��� �r��ݝ����M����oXӳr�ʮ�t_�2��Z�kށ���R"p�ȥ��\���Օ�L�ԣǪ�{��L��;s����v|���^�R���T���i�̆u���@���&HX��`��-�/z�9�֯_ݳ~�`f����=kVt�.����{�=�nC�H&PT���fs�$V���*�r�Q��谒�4}z�65:^-9V�ڵofjǞ����ϼ8����1&�V�e��9%j�9���Hs��u�(fu�Ⱍ+��ܽh ��ד���R�s����6��ec�Ъ����^wZ�Rٌ�N��L&-��״����*�9����ֱ��DSk�Z�p�R��JU����*��NT�{�͌=�mbt�ũRY+͔����8>Q+�N֦t�T��v�P5�lb��xP8s0��H�@a��d(N��YS̫̭��ӊl���"���,e�q*�*K�����4��c��H��R���g�邱I�N�
i�Z���O��k:&5&�ĶSvB�l-��m��]�9_c�t����&b@�_Y�(��\Č"�F@�R@$�l-���-j�5n[T�B2o�<:ټ
>��t꼝��~�6����p�F4a�6���X�`Ɓֹ�z�+��y�1�,��߫1��8A�8� �q^�yE�F���i����<�G����cq�i���IEND�B`�././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/man-bpython-config.rst0000644000175000017500000000126514254577175021534 0ustar00useruser:orphan:
bpython-config manual page
==========================
Synopsis
--------
**$XDG_CONFIG_HOME/bpython/config**
Description
-----------
The configuration file contains various options controlling the behaviour of
:program:`bpython`.
.. include:: configuration-options.rst
:end-before: .. _configuration_color_scheme:
.. include:: configuration-options.rst
:start-after: .. _configuration_color_scheme:
Author
------
:program:`bpython` was written by Robert Anthony Farrell
and his bunch of loyal followers.
This manual page was written by Jørgen Pedersen Tjernø ,
for the Debian project (but may be used by others).
././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1655897725.0
bpython-0.24/doc/sphinx/source/man-bpython.rst0000644000175000017500000000733314254577175020273 0ustar00useruser:orphan:
bpython manual page
===================
Synopsis
--------
**bpython** [*options*] [*file* [*args*]]
**bpython-curses** [*options*] [*file* [*args*]]
**bpython-urwid** [*options*] [*file* [*args*]]
Description
-----------
The idea is to provide the user with all the features in-line, much like modern
IDEs, but in a simple, lightweight package that can be run in a terminal window.
In-line syntax highlighting.
Highlights commands as you type!
Readline-like autocomplete with suggestions displayed as you type.
Press tab to complete expressions when there's only one suggestion.
Expected parameter list.
This displays a list of parameters for any function you call. It uses the
inspect module, then tries pydoc.
Rewind.
This is a bit misleading, but it code that has been entered is remembered,
and when you Rewind, it pops the last line and re\-evaluates the entire
code. This is error\-prone, and mostly useful for defining classes and
functions.
Pastebin code/write to file.
This posts the current buffer to a pastebin (bpaste.net) or writes it
to a file.
Flush curses screen to stdout.
Unlike other curses apps, bpython dumps the screen data to stdout when you
quit, so you see what you've done in the buffer of your terminal.
Options
-------
The long and short forms of options, shown here as alternatives, are equivalent.
If :program:`bpython` sees an argument it does not know, execution falls back to
the regular Python interpreter.
The following options are supported by all frontends:
--config= Use instead of default config file.
-h, --help Show the help message and exit.
-i, --interactive Drop to bpython shell after running file instead of
exiting. The PYTHONSTARTUP file is not read.
-q, --quiet Do not flush the output to stdout.
-V, --version Print :program:`bpython`'s version and exit.
-l , --log-level= Set logging level
-L , --log-output= Set log output file
In addition to the above options, :program:`bpython` also supports the following
options:
-p file, --paste=file Paste in the contents of a file at startup.
In addition to the common options, :program:`bpython-urwid` also supports the
following options if Twisted is available:
-r , --reactor= Use Twisted's instead of urwid's
event loop.
--help-reactors Display a list of available Twisted
reactors.
-p , --plugin= Execute a :program:`twistd` plugin. Use
:program:`twistd` to get a list of available
plugins. Use -- to pass options to the
plugin.
-s , --server= Run an eval server on port . This
option forces the use of a Twisted reactor.
Keys
----
:program:`bpython`'s keys are fully configurable. See
http://docs.bpython-interpreter.org/configuration.html#keyboard
Files
-----
**$XDG_CONFIG_HOME/bpython/config**
Your bpython config. See sample-config (in /usr/share/doc/bpython/examples on
Debian) for various options you can use, or read :manpage:`bpython-config(5)`.
Known bugs
----------
See http://github.com/bpython/bpython/issues/ for a list of known issues.
See also
--------
:manpage:`bpython-config(5)`, :manpage:`python(1)`
Author
------
:program:`bpython` was written by Robert Anthony Farrell
and his bunch of loyal followers.
This manual page was written by Jørgen Pedersen Tjernø