• cy_narrator
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 天前
    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
      link
      fedilink
      arrow-up
      2
      ·
      6 天前

      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.