Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyuff
#2
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 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.
Reply


Messages In This Thread
pyuff - by Ragnar - Mar-08-2018, 03:53 PM
RE: pyuff - by buran - Mar-09-2018, 07:27 AM
RE: pyuff - by Ragnar - Mar-09-2018, 09:28 AM
RE: pyuff - by buran - Mar-09-2018, 09:56 AM
RE: pyuff - by Ragnar - Mar-09-2018, 02:02 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020