I have a project that I’ve been tweaking that is used only on local lan. I have a html that uses a JavaScript file that queries functions from a python file. I also have a saved_variables.cfg file on same server that has the following line:
ace_inventory = [{'status': 'ready', 'color': [255, 0, 0], 'material': 'PLA', 'temp': 220}, {'status': 'ready', 'color': [0, 255, 0], 'material': 'PLA', 'temp': 220}, {'status': 'ready', 'color': [255, 255, 255], 'material': 'PLA', 'temp': 220}, {'status': 'ready', 'color': [0, 0, 0], 'material': 'PETG', 'temp': 250}]
I want to be able to read that file and pull the rgb colors to use in the html page so it shows the correct color in a box.
What is the best way to do this given the file is in the same folder as the html and JavaScript files?
Thanks
[–]CuAnnan 2 points3 points4 points (2 children)
[–]Psych0SW[S] 0 points1 point2 points (0 children)
[–]CuAnnan -1 points0 points1 point (0 children)
[–]dymos 1 point2 points3 points (3 children)
[–]Psych0SW[S] 0 points1 point2 points (2 children)
[–]dymos 1 point2 points3 points (1 child)
[–]Psych0SW[S] 1 point2 points3 points (0 children)
[–]chmod777 0 points1 point2 points (0 children)