The Ultimate Guide to Error Handling in Python (blog.miguelgrinberg.com)
from norambna@programming.dev to python@programming.dev on 07 Oct 2024 15:05
https://programming.dev/post/20293615

via mstdn.social/@miguelgrinberg/113266572735273155

#python

threaded - newest

cy_narrator@discuss.tchncs.de on 08 Oct 2024 10:46 collapse
try:
    import pandas
except:
    print("You did not install pandas, let me do it for you")
    import os
    os.system("pip install pandas")

Here is some cursed error handling

ExperimentalGuy@programming.dev on 12 Oct 2024 02:03 collapse

This is beautiful, but what would be even better is to have the program open a reverse shell so you can log into the computer to install pandas manually.