"Internal" global variables?


#1

Hi there. I’m working on a python + html + js project. I usually have some parameters that must have the same value in python than in javascript, so everytime i change the value in one file i have to do it in the other.

Is there a plugin or way to do something like:

Python: function($atom)
JS: var value = $atom

And then set $atom somewhere in the project so everytime app.py is run it checks its value and replaces anywhere $atom is present?


#2

You could read the value from a JSON file in both places?


#3

Yeah, it’s what i just did. But perhaps there is a tool to do it quick and dirty.