I'm making a package now and I want people can direct call this package so I'm using the entry point in setup.py.
Right now I have application.py which contains main() as the entry point. And the variable inside this main() function are sent to tex.py which helps me generate the latex report. (The way to generate latex file comes from this: Generating pdf-latex with python script)
# application.py
def main():
a = 123
b = 456
from tex import generate
generate()
#tex.py
content = f'{a} is not equal to {b}'
def generate():
with open('report.tex','w') as f:
f.write(content)
but this would lead to alb not defined.
I found one solution is to use global
and add from application import *
But since I have tens of variables, it'll be too long.
I wonder if there is a way to share the variables to my latex generator and keep this entry point feature.
Thanks in advance.