[issue34188] Allow dict choices to "transform" values in argpagse

2018-08-17 Thread Matthijs Kooijman
Matthijs Kooijman added the comment: One way to make the original example from Victor work, is to use the following action class: class ConvertChoices(argparse.Action

[issue34188] Allow dict choices to "transform" values in argpagse

2018-08-17 Thread Matthijs Kooijman
Matthijs Kooijman added the comment: I was today trying to achieve something similar. I also considered the solution using `type` argument, but that does not seem to play well with the `choices` argument. I was going to report that as a bug, but this issue seems similar enough to comment

[issue22454] Adding the opposite function of shlex.split()

2018-06-07 Thread Matthijs Kooijman
Matthijs Kooijman added the comment: One usecase that such a function would be well-suited for is for *displaying* commands being executed. Then, the commands will be executed as a command+args array, but can be displayed unambiguously in log output

[issue22454] Adding the opposite function of shlex.split()

2018-04-25 Thread Matthijs Kooijman
Change by Matthijs Kooijman <matthijskooij...@gmail.com>: -- nosy: +Matthijs Kooijman ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue1611944] sndhdr.what() does not recognize wav file

2008-09-16 Thread Matthijs Kooijman
Matthijs Kooijman [EMAIL PROTECTED] added the comment: I've written a new patch, which works a bit better. You can find the new patch attached. I've restructed the patch to prevent code duplication. Also, it now works with other chunks than bext (I had a file with a list chunk which triggered