Code block executed when script starts before '__main__'

Viewed 30

Is there a way to specify a code block in Python to be executed when the script starts before __main__ with its declared variables visible to all subsequent members without being passed (something like a script-level scope)?

0 Answers
Related