Closed
Description
It would be very convenient if there were a way to set the plotly directory in the PLOTLY_DIR environment variable, or default to ~/.plotly if the variable is not set. It can be easily done by changing line 4 here: https://github.com/plotly/plotly.py/blob/master/plotly/files.py
to the following:
PLOTLY_DIR = os.environ.get("PLOTLY_DIR", os.path.join(os.path.expanduser("~"), ".plotly"))
Then, to specify a custom plotly directory when running a script which uses the plotly module, we can do PLOTLY_DIR=/path/to/plotly_dir python script_that_uses_plotly.py