created application does not suport standard command line options

Bug #418355 reported by John C Barstow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly
Fix Released
Medium
Unassigned

Bug Description

quickly 0.1

The created package should support --help and --version, like standard Ubuntu applications.

I normally use the following code in the __main__ of new projects, which seems to be a best practice:

    import logging, optparse
    parser = optparse.OptionParser(version="%prog %ver")
    parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Show debug messages")
    (options, args) = parser.parse_args()

    #configure the logging framework
    #in this instance, set the logging level to show debug messages
    if options.verbose:
        logging.basicConfig(level=logging.DEBUG)

Related branches

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

This is a good idea .. should add this

Changed in quickly:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hum... it's already the case for quickly 0.1 (and therefore, for the coming 0.2) :
did you test "$ quickly --help" and "$quickly --version" ?

Changed in quickly:
status: Triaged → Invalid
status: Invalid → Triaged
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Oh, sorry, I misread : you wasn't speaking about quickly itself but for the created application!

Good idea so :)
We'll target that for 0.3 (0.2 will be out very soon).
Thanks again!

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Fixed with revision 281

Changed in quickly:
status: Triaged → Fix Committed
Changed in quickly:
milestone: none → 0.2.1
Changed in quickly:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.