python: string.replace(..) won't work

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Lucas Vogel
Date:  
Subject: python: string.replace(..) won't work
Could someone take a look at this and tell me what's wrong at
string.replace()?

#Begin code---------------------

import string, os, sys, re

fName = sys.argv[1]
s1 = sys.argv[2]
s2 = sys.argv[3]

f=open(fName,'rw')

s=f.read()

print "string.replace(" + `s` + ", " + `s1` + ", " + `s2` + ")"
string.replace(s,s1,s2)


print "s is now: " + `s` + "\n"


#end code-----------------------

Thanks


-------------------------------------------
Lucas Vogel, Software Developer
LandWarrior Project
Exponent Inc.

phone:    (623)587-6739
fax:        (623)587-4187
------------www.exponent.com---------------