It turns out that this is possible (more or less) using the PyCharm console. I think I should have realized this before, because now it seems so simple (although I have never used the console in my life, so I think I should study).
, , , ..... . PyCharm, " ", .