I don't know the "BBEdit way" to do this, but here's a few suggestions, which incidentally is how I run my python code:
* Run your python scripts from the commandline using Terminal. Either set them up as fully auto-run scripts (set executable and use the #! line) or use `python <scriptname>`. * Assuming you run via Terminal, you can run them interactively: `python -i <scriptname>` Basically, this means you finish your script or hit ^c and it leaves you in the interpreter (which is what I think you want). * Finally, I happen to like using the pdb in my code for various reasons. import pdb and then pdb.set_trace() will start the debugger. In particular, I have a multi-threaded program that I actually need to stop and run various analysis functions. I do this: def main(): try: run_server() except KeyboardInterrupt: helpme() pdb.set_trace() When I hit a ^c in my program, it drops me to the python debugger and then I can use that or interactive mode to do analysis on the data that run_server() collected. Again, this all presumes a specific workflow - using BBEdit as an editor only and running my programs via a terminal commandline. Alternately, there might be a way to configure BBEdit to start your script via `python -i` instead of just running it. - Steve On Mon, Mar 11, 2019 at 5:53 AM Skkippy <mrtngr...@gmail.com> wrote: > > I can edit and run a Python script (module) in BBEdit, but BBEdit ends the > Python session as soon as the script completes. > > What I'd like is to run a script and leave the Python interpreter active, so > that I can fool around with the functions and variables the script has > defined. > > Is there a way to do this? > > Caveat: I am not a UNIX guy; I'm barely a BBEdit guy. I have used IDLE which > can do this, but I much prefer the BBEdit editor. My needs are lightweight - > I don't want to go to an IDE and have to learn that. > > -- > This is the BBEdit Talk public discussion group. If you have a > feature request or need technical support, please email > "supp...@barebones.com" rather than posting to the group. > Follow @bbedit on Twitter: <https://www.twitter.com/bbedit> > --- > You received this message because you are subscribed to the Google Groups > "BBEdit Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to bbedit+unsubscr...@googlegroups.com. > To post to this group, send email to bbedit@googlegroups.com. > Visit this group at https://groups.google.com/group/bbedit. -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <https://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com. To post to this group, send email to bbedit@googlegroups.com. Visit this group at https://groups.google.com/group/bbedit.