You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have some magic convenience functionality that allows you to execute a python file as a module, and it will automatically export the Stack it contains to stdout as yaml. eg.
python mystack.py > mystack.yaml
Some guidelines for expected behaviour:
module contains exactly one Stack instance, assigned to a global variable
module does not contain some other script-like executable code
Some possible implementation ideas:
When you instantiate a stack, it checks whether it's locals() are the same as it's globals(), and if it's __name__ is __main__, then injects some code into globals to execute itself.
The text was updated successfully, but these errors were encountered:
Have some magic convenience functionality that allows you to execute a python file as a module, and it will automatically export the Stack it contains to stdout as yaml. eg.
python mystack.py > mystack.yaml
Some guidelines for expected behaviour:
Some possible implementation ideas:
locals()
are the same as it'sglobals()
, and if it's__name__
is__main__
, then injects some code into globals to execute itself.The text was updated successfully, but these errors were encountered: