One question : Did you remember to open the file in binary mode?
This MUST be done on windows.
On 22 jul 2008, at 06.36, jadamwil wrote:
Hello,
I am using the numpy fromfile function to read binary data from a file
on disk. The problem is that the program runs fine on a Mac, but gives
an error
I found the problem: I thought it was opening in binary mode on BOTH
windows and the mac, but on windows I passed rb with double quotes,
not 'rb' with single quotes to the open file function. Changing it to
'rb' fixed it.
On Jul 23, 8:25 am, Tommy Nordgren [EMAIL PROTECTED] wrote:
One question :
On Wed, Jul 23, 2008 at 3:37 PM, jadamwil [EMAIL PROTECTED] wrote:
I found the problem: I thought it was opening in binary mode on BOTH
windows and the mac, but on windows I passed rb with double quotes,
not 'rb' with single quotes to the open file function. Changing it to
'rb' fixed it.
Manu Hack wrote:
by the way, anyone could explain why changing to single quote makes a
difference?
rb == 'rb'
True
There's no difference between single quotes and double quotes in Python.
My guess is cargo cult debugging.
/F
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 23, 3:30 pm, Fredrik Lundh [EMAIL PROTECTED] wrote:
Manu Hack wrote:
by the way, anyone could explain why changing to single quote makes a
difference?
rb == 'rb'
True
There's no difference between single quotes and double quotes in Python.
My guess is cargo cult
jadamwil schrieb:
Hello,
I am using the numpy fromfile function to read binary data from a file
on disk. The problem is that the program runs fine on a Mac, but gives
an error or warning on windows when trying to read the data. I use it
like this:
Signal = zeros((N, 16), dtype=float32)
On Jul 22, 2:05 am, Uwe Schmitt [EMAIL PROTECTED]
wrote:
jadamwil schrieb:
Hello,
I am using the numpy fromfile function to read binary data from a file
on disk. The problem is that the program runs fine on a Mac, but gives
an error or warning on windows when trying to read the data. I
On Jul 22, 8:35 am, jadamwil [EMAIL PROTECTED] wrote:
On Jul 22, 2:05 am, Uwe Schmitt [EMAIL PROTECTED]
wrote:
jadamwil schrieb:
Hello,
I am using the numpy fromfile function to read binary data from a file
on disk. The problem is that the program runs fine on a Mac, but gives
jadamwil wrote:
On Jul 22, 2:05 am, Uwe Schmitt [EMAIL PROTECTED]
wrote:
jadamwil schrieb:
Hello,
I am using the numpy fromfile function to read binary data from a file
on disk. The problem is that the program runs fine on a Mac, but gives
an error or warning on windows when trying to read