Holy cow! Talk about dumb mistakes. I need to catch the output from string.replace into another variable. Sorry for the traffic, everyone. > -----Original Message----- > From: Lucas Vogel > Sent: Friday, August 25, 2000 12:54 PM > To: plug1 > 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. > lvogel@exponent.com > phone: (623)587-6739 > fax: (623)587-4187 > ------------www.exponent.com--------------- >