Skip to content

Allow user to set plotly directory as environment variable #533

Closed
@synzhu

Description

@synzhu

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions