classification
Title: Use argparse in the uu module
Type: enhancement Stage: patch review
Components: Demos and Tools, Library (Lib) Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bethard, paul.j3, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-09-08 17:23 by serhiy.storchaka, last changed 2019-04-26 20:28 by BreamoreBoy.

Files
File name Uploaded Description Edit
uu_argparse.patch serhiy.storchaka, 2013-09-08 17:23 review
Messages (3)
msg197289 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-09-08 17:23
Here is a patch which replaces optparse to argparse in the uu module.
msg225047 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-08-07 23:36
@Paul what is your opinion of this patch?
msg225052 - (view) Author: paul j3 (paul.j3) * (Python triager) Date: 2014-08-08 02:28
Reading through, but not testing, it looks like a faithful replacement.  The usage like will be a bit different.

Given optparse:

    usage='usage: %prog [-d] [-t] [input [output]]

automatic argparse:
    
    usage='usage: %prog [-d] [-t] [input] [output]

There is, however, a bugs issue about converting the '[..] [..]' into [..[..]].

Other than simplifying the handling of these positional arguments, this replacement doesn't add much.  

I haven't paid much attention to issues that replace other uses of optparse.  Since that is no longer deprecated, I don't think there's a rush to replace them.
History
Date User Action Args
2019-04-26 20:28:07BreamoreBoysetnosy: - BreamoreBoy
2014-08-08 02:28:58paul.j3setmessages: + msg225052
2014-08-07 23:36:01BreamoreBoysetnosy: + BreamoreBoy, paul.j3

messages: + msg225047
versions: + Python 3.5, - Python 3.4
2013-09-08 17:23:44serhiy.storchakacreate