Skip to main content
5 events
when toggle format what by license comment
Sep 26, 2011 at 6:56 comment added Hairy @wilbev It also allows you to call the class from another class e.g. MyClass.main()
Sep 25, 2011 at 18:01 comment added Allan Adair @wilbev, it's a coding style. I'd like to defer you to this explanation: artima.com/weblogs/viewpost.jsp?thread=4829 and en.wikipedia.org/wiki/Main_function#Python
Sep 23, 2011 at 19:59 comment added wilbev Allan, that worked great, thank you very much. I haven't used the glob module before and I'm not understanding that last if statement that sets up whether the main function runs or not. Any chance you can explain what that means? What is the significance of the double underscores around "name" and "main"? I don't understand where name and main syntax is coming from.
Sep 23, 2011 at 19:54 vote accept wilbev
Sep 23, 2011 at 6:05 history answered Allan Adair CC BY-SA 3.0