Questions tagged [python-interactive]
158 questions
0
votes
0 answers
Different behaviour of ipywidgets.interactive_output() on Windows and macOS
I wanted to learn how to use interactive plots in Jupyter Notebook and created a script that updates a figure based on the current values of two sliders. The idea is simply that when the value of one of the sliders changes the figure should be…

dennis
- 1
0
votes
1 answer
Separate range sliders for multiple y axes in bokeh
I have multiple line plots to draw on a single figure and I am doing this using bokeh.plotting. Using
p0.line(),
p0.extra_y_ranges(),
and
p0.add_layout(LinearAxes())
p0 being 1 bokeh figure.
I would like to have range_sliders for each y axis…

Pranit
- 5
- 3
0
votes
0 answers
How to input commands into Python InteractiveConsole when opened in Gitlab Runner
I am trying to perform an operation in Gitlab Runner using Python's InteractiveConsole. Below is the test case that I'm trying to implement. The last two lines of the before_script segment is what I want to run in the InteractiveConsole:
py_test:
…

placebo_me_please
- 19
- 2
0
votes
1 answer
Get the current session history only for Python interactive session?
This question is specific to using the python -i command (not IPython): how can I limit the exported history to commands from the current session only?
Specifically, when I run Python via terminal (python -i) and then type the following…

SultanOrazbayev
- 14,900
- 3
- 16
- 46
0
votes
0 answers
How to create interactive 3d shapes from four or more vertex points in python?
I have 3d coordinates of points which acts as vertices of a solid shape. I want to create 3d shape from those vertices. This is extra information if it helps, all the vertices will stay on a sphere maximizing the distance between each other still…

Amarnath
- 1
- 1
- 3
0
votes
0 answers
How to improve speed of slicing for interactive dataframe
I have a dataframe that is imported from csv/excel file. The file is a simulation data that sweeps variables. Different versions of the file sweep different variables. Sometimes, it sweeps variables a,c,e, other times, it sweeps variables b,c,d,…

John
- 348
- 3
- 15
0
votes
1 answer
Get Input in Python Interactive Mode
Say I have a simple script that depends on my input:
w = input()
print(f'Input is {w}')
If I copy and paste this script (both lines at the same time) into the interactive window, it won't pause on input line to receive an input.
>>> w =…

Yar
- 7,020
- 11
- 49
- 69
0
votes
1 answer
Python interactive mode command line editing broken
I have python3.10 on CentOS and command line editing and history recall doesn't work within the interactive python shell. (It does in python2 which is also installed as it is necessary for lots of system related scripts.) I also have python3.6 on an…

gbohus
- 11
- 3
0
votes
1 answer
Matplotlib not clearing old plots when updating figure
I have a code to plot points and to update the number of points in X,Y with a slider.
There is no way I can make the old plots disappear in the update function, tried all possible variations of .clear() and so on...
Here is my code; comments are…

nls
- 11
- 2
0
votes
2 answers
Plotly interactive visualizations dropdown
I am attempting to create a plotly dash drop-down whose selection is used to filter a dataframe and generate a pie chart from the filtered dataframe. I started with the working code from plotly interactive visualizations documentation and as…

Max Duso
- 305
- 1
- 4
- 15
0
votes
0 answers
Make "Arrow Up" button in interactive python mode continue from where it left off
Problem
When I was using Windows, the "Arrow Up" button would continue where it left off in the Python REPL in the terminal, meaning: say I wrote lines l_1, l_2, l_3, l_4 in that order. Then I use arrow up three times to write l_2 again. Now how it…

joinijo
- 353
- 2
- 9
0
votes
2 answers
How to use Python Interactive Window in VS Code with functions
I am new to using the python interactive window and I like it but it seems to clear local variables in between runs, so if I run something like
def main():
dates = '2012152'
# %%
print(dates) # want to just run this
#…

Thomas Dewitt
- 50
- 6
0
votes
0 answers
Python "help()" displays using "more" instead of "less" in Anaconda Prompt
I am using Anaconda Prompt (using Windows 10) at my work environment and when I type help(str), it displays the help text using more and I can only navigate the message down page by page.
However at my home Linux environment, help(str) displays the…

dhu
- 718
- 6
- 19
0
votes
0 answers
Interactive chart - Move a line to the position I need - Python
I need to create interactive chart, on which a line can be slided right/left on x axis while saving new values.
Illustration:
I have the right red line in the A position but want to move it to B position (orange line) manually and then save position…

Ксения Козлова
- 1
- 1
0
votes
1 answer
Matplotlib Polygon contains_point inside class not working
I'm modifying the poly_editor of matplolib here and I need to verify if some points are inside the polygon. I put a print of poly.contains_point((x,y)) when the poly is created in the main and inside the class. If I not change the polygon…

Aelius
- 1,029
- 11
- 22