Avoid the terminal process to close, after BBEdit runs a script
As I understand, you have a Python script in BBEdit.



You choose to test the code using the "Run in Terminal" option from the '#!' menu.



Now a Terminal window opens, runs the script and exits.



Now here is the culprit. BBEdit does not only run your script, but also adds an exit. There is no option in BBEdit to remove this exit command. But BBEdit is highly scriptable and there are some workarounds. You can create a BBEdit Script (from the Scripts menu) that runs, but personally I think creating Service is the easiest one (run some AppleScript that opens your script in the Terminal as you would have done manually).

In this treat you have provided a script that actually does what you want.