ipython

VSCode Interactive Window "Run selection/line in Interactive Window" stopped working

VSCode Interactive Window "Run selection/line in Interactive Window" stopped working Question: I face the same problem as VS Code "Run selection/line in Python interactive window" not working at all, yet using Bisect to disable and detect the reasons through extensions didn’t help. For me the problem started after VScode itself was updated yesterday. VS Code …

Total answers: 2

How to wait for the user to click a point in a figure in IPython notebook?

How to wait for the user to click a point in a figure in IPython notebook? Question: I took the following steps to setup an IPython backend in Google Colab notebook: !pip install ipympl from google.colab import output output.enable_custom_widget_manager() Then I log the (x,y) location of the user’s click on a figure: %matplotlib ipympl import …

Total answers: 2

iPython custom cell magic – store output in variable?

iPython custom cell magic – store output in variable? Question: I recently discovered iPython magic functions and wrote some custom magic. I would like to use cell magic to parse strings, change them slightly and return the result. Is there a way to store the output of my custom cell magic function in a variable? …

Total answers: 1

how to call an ipython within virtualenv?

how to call an ipython within virtualenv? Question: Good time of the day, everyone! The problem is the following: I create virtualenv using the command python3 -m venv env (my python version 3.8.9) I activate it . ./env/bin/activate Install ipython: pip install ipython Try to run it ipython, but instead of invoking my virtualenv’s ipython, …

Total answers: 1

ipython help functions(?)(??) dosen't describe info properly

ipython help functions(?)(??) dosen't describe info properly Question: installed IPython version 8.5.0 via conda. after running ‘?’ in shell this is part of output: object? -> Details about ‘object’. object?? -> More detailed, verbose information about ‘object’. so for trying this i also executed: In [5]: len? Signature: len(obj, /) Docstring: Return the number of …

Total answers: 1

run script from spyder console using relative path

run script from spyder console using relative path Question: I want to run .py file from ipython console in spyder. Script also takes csv file as input. But I got Exception: File src.py not found. How do I run the script from spyder console using relative path? run src.py input.csv Asked By: spb || Source …

Total answers: 1

What is the 'time' in jupyter notebook?

What is the 'time' in jupyter notebook? Question: What’s the type of time in jupyter notebook? Variable or function? Below is my tests using python code. Test 1: Test 2: Test 3: Test 4: Test 5: Asked By: Jerry Chou || Source Answers: time (or more properly, %time), is an IPython magic – a command …

Total answers: 1

How to show real time process command line in Jupyter Notebook?

How to show real time process command line in Jupyter Notebook? Question: Example, I have this code saved as test.py import time for i in range(0, 10): print(i) time.sleep(3.0) When I try to run this on ipynb with !python test.py It processed but it doesn’t show realtime in output. I want it to be like …

Total answers: 1

in ipython how do I accept and use an autocomplete suggestion?

in ipython how do I accept and use an autocomplete suggestion? Question: I’m using Python 3.8.9 with IPython 8.0.1 on macOS. When I type anything whatsoever, it displays a predicted suggestion based on past commands. Cool. However, how do I actually accept that suggestion? I tried the obvious: tab, which does not accept the suggestion, …

Total answers: 3