Rossum's tutorial on Python states:
"open() returns a file object, and is most commonly used with two
arguments: 'open(filename, mode)'
mode 'r+' opens the file for both reading and writing."
Here's a little session in Python's interactive window
>>> f=open('mytext.txt','w+')
>>> f.write('My name is Bob')
>>> s=f.read()
>>> s.len()
>>> len(s)
4082
>>>f.close()
If I open the file mytext.txt in Notepad I see something that begins
with
"My name is Bob VwMÚ¸x¶ Ð"
and goes on for approximately 4082 characters.
What's happening??
Alex
--
http://mail.python.org/mailman/listinfo/python-list