1""" 2categories: Modules,os 3description: ``environ`` attribute is not implemented 4cause: Unknown 5workaround: Use ``getenv``, ``putenv`` and ``unsetenv`` 6""" 7import os 8 9try: 10 print(os.environ.get("NEW_VARIABLE")) 11 os.environ["NEW_VARIABLE"] = "VALUE" 12 print(os.environ["NEW_VARIABLE"]) 13except AttributeError: 14 print("should not get here") 15 print(os.getenv("NEW_VARIABLE")) 16 os.putenv("NEW_VARIABLE", "VALUE") 17 print(os.getenv("NEW_VARIABLE")) 18