[Tutor] write to a file in linux
Watt III, Glenn
gwatt3@backbonesecurity.com
Tue, 20 Aug 2002 15:55:48 -0400
I am trying to write a script in which i write and save a new file in
linux i ran across tutorial that looks kind of out dated but gave me a
point in the right direction heres what i have
>>> import os
>>> wrt =3D os.open("an/interesting/filename.py", "w")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: an integer is required
whats the deal i provided the variable wrt. i tried the above with both
new filenames and previously existing filenames. anyways after that i
plan to save the file and to combine all my emails into one i thought i
would include my next steps to have them checked out so here goes=20
>>> p.write('here is the stuff i plan to put inside the newly created
file')
>>> p.close()
ok well there it is hopefully this will actually work
Thankx