Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyuff
#3
For this it was clear, now I can understand.(I am now curious how would they do the test i mean globally, so if you have a link where this is explained i ll appreciate it)
(Mar-09-2018, 07:27 AM)buran Wrote: 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

For the main I understand that this is the main body of the script where the execution starts and calls the subroutines above, but it was mains not main in their code.

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.
[/quote]

Thank you for helping :)
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