Linux > python > file-I/O ?

news at absamail.co.za news at absamail.co.za
Sat Dec 24 11:55:42 EST 2005


I've just started to test/learn python.
I've got Linux > mandrake9 > python  & documentation.
What I'll initially want to be doing needs file I/O, so I
wanted to confirm file I/O early in my tests.

Following the examples :
>>> f=open('/tmp/workfile', 'w')
>>> print f
<open file '/tmp/workfile', mode 'w' at 80a0960>   <-- OK

But:
>>> f.read(size)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'size' is not defined  <-- ?? Obj-method unknown ??


What's wrong ?

I read:   "The set of such modules is a configuration 
option which also depends on the underlying platform."
My documenation refers also to Mac & Win installations.
Is there a linux > python NewsGroup ?

Thanks for any info.

== Chris Glur.





More information about the Python-list mailing list