There is something I would like which I have not been able to find.

When I use the programming language R, I typically use the IDE RStudio. One of the things I like about RStudio is that it A: allows me to run individual lines of code, and B: it shows me the objects in the environment within another pane (see attached screenshot).

I find this extremely useful when working with code that is not mine - if I run part of the code and see the objects that are created, it saves debugging all the types (is it a list or a vector? etc)

I'd like to have a similar IDE that works with Python in the same way. Does such an IDE exist? Is it PyCharm?

#python #rstats #rstudio

@spacefinner I haven’t worked with R, however the debugger in PyCharm does that for Python. Jupyter notebooks could probably work too. I’m sure there’s a nice PyCharm plugin for it too.
@spacefinner RStudio will handle Python as well. Does it not do what you want?

@zornslemmon Although I knew RStudio handles Python I wasn't aware there was an environment window toggle to switch to viewing the Python environment! Thank you. It's not ideal [1] but it's good and will save me moving to another IDE.

[1] it doesn't show a Python list like [1,2] as "list of 2", for example, but instead just shows [1,2], which is slightly annoying because my forgetting the syntax of structures in Python is the problem I'm trying to solve.

@spacefinner Take a look at Positron - also from @Posit . The engineers have taken a lot of the lessons from RStudio, including the Environment panel & line-wise code execution. So much so that Positron feels quite natural for an RStudio user like myself. I think Positron is built on Code OSS, the same platform that underlies Microsoft's popular VS Code or the open source VSCodium IDEs. Positron is a data science IDE for both R and python. Might be worth a look: https://positron.posit.co/
Positron

Positron unifies exploration and production work in one free, AI-assisted environment, empowering the full spectrum of data science in Python and R.

Positron
@spacefinner The most natural transition would be to Positron since you're coming from RStudio. Positron will give you what you described. One caveat is that since you want to run lines of code one-by-one in Python, it won't always feel like how you're doing it in R if you're within a chain/pipe of code because Python (like Julia) sadly cannot have a "block" of chained code be interrupted with a highlight-then-run like you can do inside piped R code.
@spacefinner
There are several. Spyder. Pyzo, and Eric are other examples. I prefer Pyzo--it's simple but sufficient.
@rdnielsen I haven't heard of Pyzo and will take a look!
@spacefinner Spyder looks a lot like RStudio.