Should command line option processing logic and logging logic be a separate function or part of the main loop in a Python program
<p>I am an intermediate level Python Programmer.  I have written a Python program that scrapes Mutual Fun NAV data from a web site and inserts those into a database.  The code is around 176 lines long and has logic related to command line option processing using the argparse module and logging logic using the logger module.
Right now the entire logic around command line option processing and logging is part of the main() loop.  Should the logic for these be encapsulated in their own little functions or be part of main?
What does proper design principles require?</p>
