Mar-09-2018, 07:27 AM
in the tests folder you have tests, not examples. These are test that package developers of/contributors to pyuff package would run to test functionality they have developed.
the example usage is in the Showcase, which is IPython notebook
https://github.com/openmodal/pyuff/blob/...case.ipynb
as to the
the example usage is in the Showcase, which is IPython notebook
https://github.com/openmodal/pyuff/blob/...case.ipynb
as to the
if __name__ == '__main__':
it is paradigm that allows to import module as well to execute it as separate script. Usually above that line one would not put executable code (only imports, class/ function definitions, etc.), when the file is executed as a script its __name__ is always __main__ (that is python internals), so the body of the if block would be executed. However if you import the module, it would not be executed, but you will have access to all classes/functions imported.