Has the Python community considered providing an entry point for executable scripts cleaner than "if __name__ == '__main__' "?
-
-
Answer:
Yes. PEP-299 (http://www.python.org/dev/peps/pep-0299/) proposed a cleaner syntax but was rejected after only a brief discussion.
Jeff Hammerbacher at Quora Visit the source
Other answers
setuptools has a concept of 'entry points': http://www.5dollarwhitebox.org/drupal/node/75
Mark Roddy
Related Q & A:
- Is ST_GeomFromText better than providing direct geometry?Best solution by Geographic Information Systems
- How to run an executable from within a c program?Best solution by Stack Overflow
- How to delete an entry from a dictionary in Python?Best solution by Stack Overflow
- Why do I get "entry point not found" on my messenger?Best solution by Yahoo! Answers
- What is considered to be an entry level IT job?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.