[xiph-cvs] cvs commit: vorbis-python/test enc.py enc2.py

Andrew Catham Master of Python andrew at xiph.org
Fri Feb 7 23:12:29 PST 2003



andrew      03/02/08 02:12:29

  Modified:    .        ChangeLog
               src      pyvorbisfile.c pyvorbisinfo.c
               test     enc.py enc2.py
  Log:
  2003-2-07   Andrew H. Chatham <pyogg at andrewchatham.com>
          * Applied another patch from Nicodemus to fix things windows. Pass
          the "b" flag to all file open commands.

Revision  Changes    Path
1.20      +4 -0      vorbis-python/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/ChangeLog,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ChangeLog	19 Jan 2003 00:50:48 -0000	1.19
+++ ChangeLog	8 Feb 2003 07:12:29 -0000	1.20
@@ -1,3 +1,7 @@
+2003-2-07   Andrew H. Chatham <pyogg at andrewchatham.com>
+	* Applied another patch from Nicodemus to fix things windows. Pass
+	the "b" flag to all file open commands.
+	
 2003-1-18   Andrew H. Chatham <pyogg at andrewchatham.com>
         * Applied a patch from Nicodemus <nicodemus at globalite.com.br> to 
         get this to build on windows.

<p><p>1.9       +1 -1      vorbis-python/src/pyvorbisfile.c

Index: pyvorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisfile.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pyvorbisfile.c	19 Jan 2003 00:50:48 -0000	1.8
+++ pyvorbisfile.c	8 Feb 2003 07:12:29 -0000	1.9
@@ -202,7 +202,7 @@
   
   if (PyArg_ParseTuple(args, "s|sl", &fname, &initial, &ibytes)) {
 
-    file = fopen(fname, "r");
+    file = fopen(fname, "rb");
     fobject = NULL;
 
     if (file == NULL) {

<p><p>1.15      +1 -1      vorbis-python/src/pyvorbisinfo.c

Index: pyvorbisinfo.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisinfo.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- pyvorbisinfo.c	19 Jan 2003 00:50:48 -0000	1.14
+++ pyvorbisinfo.c	8 Feb 2003 07:12:29 -0000	1.15
@@ -964,7 +964,7 @@
   strcat(tempfile, ".pytemp");
   
   /* Open the file */
-  in_file = fopen(filename, "r");
+  in_file = fopen(filename, "rb");
   if (!in_file) {
     PyErr_SetFromErrno(PyExc_IOError);
     return NULL;

<p><p>1.3       +2 -2      vorbis-python/test/enc.py

Index: enc.py
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/test/enc.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- enc.py	27 Jan 2002 11:14:20 -0000	1.2
+++ enc.py	8 Feb 2003 07:12:29 -0000	1.3
@@ -8,7 +8,7 @@
 class WaveReader:
     def __init__(self, filename):
         self.filename = filename
-        self._f = open(filename)
+        self._f = open(filename, 'rb')
         self._read_header()
 
     def _read_header(self):
@@ -95,7 +95,7 @@
     os.packetin(header_com)
     os.packetin(header_code)
     
-    fout = open('out.ogg', 'w')
+    fout = open('out.ogg', 'wb')
     inwav = WaveReader('in.wav')
 
     og = os.flush()

<p><p>1.3       +2 -2      vorbis-python/test/enc2.py

Index: enc2.py
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/test/enc2.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- enc2.py	27 Jan 2002 11:14:20 -0000	1.2
+++ enc2.py	8 Feb 2003 07:12:29 -0000	1.3
@@ -2,8 +2,8 @@
 '''An example of encoding using the Python wave module'''
 import ogg.vorbis, wave
 
-fout = open('out.ogg', 'w')
-inwav = wave.open('in.wav','r')
+fout = open('out.ogg', 'wb')
+inwav = wave.open('in.wav','rb')
 channels = inwav.getnchannels()
 vd = ogg.vorbis.VorbisInfo(channels = channels,
                            rate = inwav.getframerate(),

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list