I want to detect if the user is running bpython shell.
I've looked around but couldn't find anything that looked useful. For instance, trying to import bpython and relying on that is a false-positive, because the user could have bpython installed but actually be running completely different shell.
Is there a nice way of doing this?
The following works on my system , but I'm not sure how portable it is:
Note that this method can probably easily be fooled by renaming a non-bpython interpreter to
bpythonor by renamingbpythonto something else.