Issue31182
Created on 2017-08-11 08:25 by Steve Barnes, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 3084 | closed | Steve Barnes, 2017-08-13 19:21 | |
| Messages (3) | |||
|---|---|---|---|
| msg300156 - (view) | Author: Steve Barnes (Steve Barnes) * | Date: 2017-08-11 08:25 | |
I would like to add to the command line of both tarfile and zipfile interface some additional options that I believe to be useful. 1. Wildcard filename matching for archiving 2. Recursive archiving (with excludes) 3. Append to archive option 4. Compression Selection 4.1 For zipfile: zip64, bizp2 & lzma (if available) 4.2 For tarfile: document that gz, xz & bz2 are there and determined by ext. |
|||
| msg302328 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-09-16 06:56 | |
The command-line interface of zipfile and tarfile modules was deliberately kept simple. If you need more complex functionality, just write a script. Python is a programming language!
> 1. Wildcard filename matching for archiving
This is a work for a shell. Interpreting wildcards by a program breaks compatibility and makes impossible to handle files containing special characters. For example it breaks:
python3 -m zipfile -c myzip.zip "The Book [vol. 5].txt".
No way.
> 2. Recursive archiving (with excludes)
Archiving already is recursive. It may be worth to add an option for adding directories not recursively.
> 3. Append to archive option
May be. I don't know what to do with compressed tar archives.
> 4.1 For zipfile: zip64, bizp2 & lzma (if available)
Would be nice. And this option could force compression for tarfile.
As new features they can be added only in 3.7.
|
|||
| msg339148 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2019-03-29 20:54 | |
I'm going to agree w/ Serhiy and say thanks to Steve for the idea but for maintainability purposes we should keep the CLI of both modules simple and only for critical operations. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:50 | admin | set | github: 75365 |
| 2019-03-29 20:54:42 | brett.cannon | set | status: open -> closed resolution: rejected stage: resolved |
| 2019-03-29 20:54:29 | brett.cannon | set | nosy:
+ brett.cannon messages: + msg339148 |
| 2017-09-16 06:56:02 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages:
+ msg302328 |
| 2017-08-13 19:21:51 | Steve Barnes | set | pull_requests: + pull_request3126 |
| 2017-08-11 08:25:56 | Steve Barnes | create | |
