Roundup Robot added the comment:
New changeset b861c7717c79 by R David Murray in branch 'default':
whatsnew: Wave_write handles unseekable files. (#5202)
http://hg.python.org/cpython/rev/b861c7717c79
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 6a599249e8b7 by Serhiy Storchaka in branch 'default':
Issue #5202: Added support for unseekable files in the wave module.
http://hg.python.org/cpython/rev/6a599249e8b7
--
nosy: +python-dev
___
Python
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5202
___
Serhiy Storchaka added the comment:
Here is simplified and updated to tip patch.
--
Added file: http://bugs.python.org/file32575/wave_write_unseekable_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5202
Serhiy Storchaka added the comment:
Oh, I forgot attach a patch. In any case it already slightly outdated.
After looking at other audio modules I think David's approach is better. It is
also used in the chunk module. Here is updated patch with tests (tests are not
final, issue18919 provides
Serhiy Storchaka added the comment:
Oh, I forgot attach a patch. In any case it already slightly outdated.
After looking at other audio modules I think David's approach is better. It is
also used in the chunk module. Here is updated patch with tests (tests are not
final, issue18919 provides
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5202
___
Serhiy Storchaka added the comment:
Here is corrected patch (it uses relative seek()) with a lot of tests.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5202
___
Serhiy Storchaka added the comment:
Now, is there some problem if we remove the calls to the tell method
in _write_header ? See patch attached (tests are very welcome too).
Yes, there is a problem. User can pass already open file to wave.open() and
file position can be not 0 at the start of
Terry J. Reedy tjre...@udel.edu added the comment:
Is this still a problem with 2.7-3.2?
GP, what state do you think either patch is in?
--
nosy: +tjreedy
stage: - patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6
David Jones d...@pobox.com added the comment:
On 12 Feb 2009, at 09:00, David Jones wrote:
David Jones d...@pobox.com added the comment:
The following program does a very basic do-i-get-back-what-i-wrote
test.
sunau can't cope; I am investigating.
I see. sunau uses mu-law compression
David Jones d...@pobox.com added the comment:
The following program does a very basic do-i-get-back-what-i-wrote test.
sunau can't cope; I am investigating.
#!/usr/bin/env python
# $Id$
# Audio File Tests
import aifc
import sunau
import wave
import struct
import sys
from StringIO import
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 21:15, David Jones wrote:
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 16:57, Guilherme Polo wrote:
Guilherme Polo ggp...@gmail.com added the comment:
Now, is there some problem if we remove the calls
Guilherme Polo ggp...@gmail.com added the comment:
Nice.
I said tests in hope wave gets more tests, since right one there is a
single one. I will see if I can produce something.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5202
New submission from David Jones d...@pobox.com:
When using the wave module to output wave files, the output file cannot
be a Unix pipeline.
Example. The following program outputs a (trivial) wave file on stdout:
#!/usr/bin/env python
import sys
import wave
w = wave.open(sys.stdout, 'w')
David Jones d...@pobox.com added the comment:
Attached is a patch which is a diff from this version of wave.py :
http://svn.python.org/view/*checkout*/python/trunk/Lib/wave.py?rev=54394
--
keywords: +patch
Added file: http://bugs.python.org/file13011/wave-20090210.patch
Guilherme Polo ggp...@gmail.com added the comment:
Wouldn't it be better if you only ignored the 'illegal seek' error
instead of ignoring any ioerror (should it even be always discarded) ? I
get a 'bad file descriptor' under Windows 7, but, again, can it be
always discarded ?
You can also
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 12:28, Guilherme Polo wrote:
Guilherme Polo ggp...@gmail.com added the comment:
Wouldn't it be better if you only ignored the 'illegal seek' error
instead of ignoring any ioerror (should it even be always discarded) ?
No.
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 12:28, Guilherme Polo wrote:
Guilherme Polo ggp...@gmail.com added the comment:
I'm really unsure about the proposed patch.
Perhaps my example was too trivial. The point is that if you call
setnframes then you can get
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 13:02, David Jones wrote:
I also note that my patch can be improved by removing its last 11
lines.
Er, no it can't. What was I thinking?
___
Python tracker rep...@bugs.python.org
Guilherme Polo ggp...@gmail.com added the comment:
I see what you want to do, but I fell really uncomfortable by totally
ignoring IOError. I could get a bad file descriptor under Linux too, and
I wouldn't like to see it discarded for no reason.
Now, is there some problem if we remove the calls
David Jones d...@pobox.com added the comment:
On 10 Feb 2009, at 16:57, Guilherme Polo wrote:
Guilherme Polo ggp...@gmail.com added the comment:
Now, is there some problem if we remove the calls to the tell method
in _write_header ? See patch attached (tests are very welcome too).
Yes
22 matches
Mail list logo