It doesn’t seem fancy. It just seems like an extremely useful feature. Write a function and throw test cases at it in the console. You can see the results with no need to add lines to source that you’ll later need to remove.
Running python3 doesn’t do the same thing. With the previous functionality, we could check variables and use functions that were loaded by the program. Running python3 just gives us a blank slate, which does not help with debugging. I don’t see how removing this debugging ability is a good idea.
At the shell prompt “$”, enter “python”. You should now have the Python console prompt “>>>”.
Assume the source code lives in “main.py”. In the console, enter “from main import *”. All the definitions in main will now be available.
Call functions as usual.
Here’s a copy-paste:
Python 3.10.11 (main, Apr 4 2023, 22:10:32) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from main import *
This is a big disappointment. It was so easy for a student to click the run button and use the console to debug. Now the ability to do that is buried within a workaround that requires somebody to type some stuff that a beginning programmer doesn’t know.
There should be a new Python prybar template available for people who want to use it the way it was before.
Workaround: Use IPython (template), which is better than prybar.
If the problems leading to the removal of prybar from the python replit module can be worked around easily using IPython, I would look forward to that.
That’s very much appreciated. I am a teacher like @dniemitalo and this was a super handy feature for helping students understand state/behavior, or do quick experiments with them when I walk up to assist without adding it to their main.py.
I use it every day, and I’m sorry I didn’t notice the survey about it!
I had no idea that the “console” tab was actually running a separate tool called prybar. I always assumed that the “console” tab was the python console. I have always depended on that to interrogate the state of variables post-execution and test functions. Very useful in performing demonstrations for students. I would appreciate having this functionality return.