165 questions
-1
votes
1
answer
60
views
Unable to read output from interactive script in python subprocess.Popen
The following program is used to simulate cmd.exe using subprocess.
import subprocess
import sys
import threading
def handle_output(shell):
while shell:
output = shell.stdout.readline(1)
...
0
votes
1
answer
62
views
What is VSCode setting to send output from code executed to interactive window instead of terminal?
looking to move away from Jupyter Notebook and seen interactive window in VSCode. However selecting code and then pressing shift+enter sends execution output to terminal, not interactive window.
Added ...
3
votes
2
answers
1k
views
Unresponsive Python interactive window in Visual Studio 2022
I have installed the Python development workload in Visual Studio 2022.
When I try to execute 2+2 in the interactive window, there is no result and I only see the waiting mouse cursor.
Is this ...
4
votes
1
answer
353
views
Python 3.13 REPL with vim or emacs key bindings?
I just upgraded to Python 3.13 and found that the vim key bindings that I had set up via readline and ~/.editrc, which worked in previous releases of the Python REPL, no longer work. Is there some way ...
0
votes
1
answer
357
views
Why does VS Code require the Jupyter extension to run Python interactively, even for .py files?
I've noticed that when trying to run Python code interactively in VS Code (e.g., executing code cells in .py files), VS Code prompts me to install the Jupyter extension.
This seems strange because I ...
0
votes
1
answer
35
views
Python imports & interactive window
I am struggling with imports in Python.
Currently, this is my file structure:
.
├── my_project
│ ├── helpers
│ │ ├── SomeHelper.py
│ │ └── __init__.py
│ ├── CalculateStuff
│ │ ├── ...
0
votes
0
answers
214
views
Efficient Python for Data Science Interactive setup with VSCode with Remote Development?
For the past two years I've been iterating my development setup. My use case for Python is data science and machine learning, meaning the Jupyter Notebook was my first choice and my primary need is to ...
0
votes
0
answers
199
views
Jupyter Notebooks in VS Code No Longer Recognize Working Directory—Why?
Starting this week, my Jupyter notebooks in VS Code have stopped recognizing the working directory correctly. Previously, everything worked as expected without any manual configuration.
When I run a ...
0
votes
1
answer
518
views
Having Error 200 in my Python code connecting it to Interactive Brokers
I am trying to scan some options and get a ton of Error 200 and strikes that do not even exist. Such as TSLA Strike 177.33!!! Any idea how to overcome this? Thank you.
def init_contract(symbol):
...
1
vote
0
answers
213
views
Jupyter Lab 4.x and ipywidgets
I am currently working in JupyterLab version 4.1.6 and having problems with sliders from ipywidgets (version 8.1.2). I wanted to display 2D slices from a 3D image, where the slider would control the ...
0
votes
1
answer
87
views
How to configure VS Code interactive window workingdirectory to a script in a subfolder?
My project is organized as follow:
├── data
│ ├── processed # The final data sets for modeling
│ └── raw # The original data files.
├── src ...
0
votes
0
answers
228
views
Google Colab: On-click interactive plots not working
I'm trying to use this snippet, which works as intended locally, in Google Colab. The snippet basically set to NaN a pixel value on click. Google Colab does show correctly the image but if I click on ...
0
votes
1
answer
84
views
How to change cell value alignment in ipysheet sheet from a pandas dataframe
how can i change the alignment of an entire column or an individual cell in ipysheet ?
I tried :
for k,c in enumerate(sheet1.cells):
c.style['textAlign']='left'
but it doesnt work (might be ...
1
vote
1
answer
145
views
Altair - plot on background image
I would like to display an image and plot markers on it. However, the image does not appear to align with the axis well, resulting in the markers in wrong places. Here is my code:
import altair as alt
...
0
votes
2
answers
390
views
Pressing Escape in VS Code Interactive (IPython) deletes the cell. How can I disable this?
I normally write code in a python script (.py-file) divided into cells (with # %%) and execute the cells or single lines of code in an interactive window to the right of the script.
The interactive ...