[Pythonmac-SIG] Frustration building, please help...

Chris Scott kaffeen@mac.com
Thu, 01 Nov 2001 16:17:37 -0500


Well, so far Python hasn't been too hard to start learning, except that it
doesn't really seem to work. I'm working on a Mac G4 OS9 and can't even seem
to read, write, or manipulate files. Here's what I get, just trying to do
some simple stuff right out of the tutorial...

>>> f=open('blah', 'r+')
>>> f.write('testing 123')
>>> f.read()
Traceback (most recent call last):
  File "<input>", line 1, in ?
IOError: (0, 'Error')
>>> f.readline()
''
>>> f.write('testing again')
>>> f.readline()
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00widths\x06\x00\x00\x00\x06\xd0\x00\x00\x17\
xa0\x12m<\x81\x12n\x13X\x12mO\xb8lls\x01\x00\x00\x00Ws\n'
>>> f.read()
Traceback (most recent call last):
  File "<input>", line 1, in ?
IOError: (0, 'Error')
>>> 

Help and calming words assuring that I haven't chosen the wrong scripting
language would be much appreciated. Thanks.

- Chris