slynch8 / 10x

10x IDE/Editor
189 stars 33 forks source link

Python API: Call some named Main function when the script is imported #2794

Closed SimpsonGSD closed 1 week ago

SimpsonGSD commented 3 weeks ago

If it exists always call a named function, Main() or Main10x() probably good to pick something that isn't super generic so people don't name a function the same name and get confused why it's being called.

Better still if you could support the standard Python way of doing it so that this is satisfied if __name__ == "__main__" currently __name__ comes back as builtins

slynch8 commented 1 week ago

done (1.0.218). Added __name__