Questions tagged [ptpython]
10 questions
5
votes
3 answers
How to inspect the type of REPL you're using?
There're many kinds of Python REPL, like the default REPL, ptpython, ipython, bpython, etc. Is there a way to inspect what current REPL is when I'm already in it?
A little background:
As you may have heard, I made pdir2 to generate pretty dir()…

laike9m
- 18,344
- 20
- 107
- 140
4
votes
1 answer
How to read history in ptpython console?
I've been trying to figure out how to get save and read in the history of my Python commands in a ptpython console, but haven't been able to do so. All of my efforts have so far been variations of this answer. However, I still am not able to read in…

gr1zzly be4r
- 2,072
- 1
- 18
- 33
2
votes
1 answer
How to correctly "stub" __objclass__ in a Python class?
I have Python class looking somewhat like this:
class some_class:
def __getattr__(self, name):
# Do something with "name" (by passing it to a server)
Sometimes, I am working with ptpython (an interactive Python shell) for debugging.…

s-m-e
- 3,433
- 2
- 34
- 71
1
vote
0 answers
how i can scroll in ptpython 'help' window
is there any way how I can scroll inside 'help' window in ptpython repl? When I type the name of a function a help opens at the bottom, but I don't know how i can scroll it up/down (or search inside it). Is this possible? I know about the…

matej
- 121
- 3
1
vote
1 answer
can't capture boto3 using python placebo
I have some Python (v.3.x) that works like a charm on AWS using boto3 etc..
Now I'm asked to write some tests around that, so I found this to capture the response which I'll create the test around it:
https://github.com/garnaat/placebo
Using…

Naim Salameh
- 387
- 4
- 18
1
vote
1 answer
prompt_toolkit Keys add_binding not working
I am learning prompt-toolkit and try to solve a custom prompt using prompt-toolkit (I already know there is a std. prompt that works differently). I am following the description given by Jonathan for a similar question.
So far I took out and…

moin moin
- 2,263
- 5
- 32
- 51
1
vote
1 answer
Autocompletion and function definition in Python Interpreter
See the below GIF
How does the documentation for all the functions appear as you type in
the terminal?
I am already familiar with autocompletion and there are bunch to tutorials to do this but what about function definition? Currently I am…

python
- 4,403
- 13
- 56
- 103
0
votes
1 answer
How to config ptpython when embedding in an app
I am using PTPython to interactively debug my app. When embedding PTPython in my app, how do I support reading the PTPthon config file?
According to the example PTPython config file, in Linux the PTPython config file should be located at the path…

JS.
- 14,781
- 13
- 63
- 75
0
votes
1 answer
python-prompt-toolkit: make container scrollable
I am trying to make a Container scrollable using ScrollablePane.But I can't scroll either with mouse or keyboard
from prompt_toolkit.layout.controls import FormattedTextControl
from prompt_toolkit import Application
from prompt_toolkit.layout import…

FBR
- 170
- 1
- 2
- 10
0
votes
3 answers
Persisting module installation across new python virtual environments
For background, I work mostly in the terminal and edit code using vim. For long-term python projects I manage venvs and lock files in source control using poetry.
There are some modules I like to have installed in almost every venv I work in, such…

causaSui
- 166
- 9