Black Lives Matter. Please consider donating to Black Girls Code today.

Plotly using IIS plus CGI Python on Windows Server headacke

A big headacke getting plotly running with Microsoft IIS on Windows Server using CGI binding with python.exe. As home directory will be pointing to some subfolder under windows system folder. So a no-no for writing .plotly and .testing subfolders!!! Plotly will not start and give read/write error.

I made the following ugly change in files.py:


import os

file structure

#PLOTLY_DIR = os.path.join(os.path.expanduser("~"), “.plotly”)
#CREDENTIALS_FILE = os.path.join(PLOTLY_DIR, “.credentials”)
#CONFIG_FILE = os.path.join(PLOTLY_DIR, “.config”)

#TEST_DIR = os.path.join(os.path.expanduser("~"), “.test”)
#TEST_FILE = os.path.join(PLOTLY_DIR, “.permission_test”)

#Changed by Al-Noor

PLOTLY_DIR = ".plotly"
CREDENTIALS_FILE = os.path.join(PLOTLY_DIR, “.credentials”)
CONFIG_FILE = os.path.join(PLOTLY_DIR, “.config”)

TEST_DIR = ".plotly_test"
TEST_FILE = os.path.join(PLOTLY_DIR, “.permission_test”)

So now ,plotly folders are made in the Web folder where IIS User has permission to write/read.

And now I can use plotly on Microsoft 2016 server with IIS and Python via CGI.

But it would be better to have a more clean solution, I think!
(local accounts now get the .plotly folders in each of their local directory where they run py with plotly.

I would like to submit this issue / feature request to plotly python team.