yea, go that, actually I only know the entry name "wallFName =" the rest is unknown, so I used the "for line in sFile" then did a if/then/else construct when it finds the line re-write the entire line(this is what *.replace does not do"
hek I will post the code, I just have to find a way to tell the launcher o refresh the wallpaper, google provided nothing
#!/usr/bin/env python
import os
import sys
import fileinput
import glob
import random
import re
piclist=glob.glob('/hdd3/Documents/Image_Files/wallpapers/*.*')
wallpic=random.choice(piclist)
wppath="/hdd3/Documents/Image_Files/wallpapers/" + wallpic
#/home/root/settings/launcher.conf
textToSearchFor= "wallFName"
newWallP= "wallFName =" + wppath
fileToSearch= "/hdd3/Documents/temp/launcher.conf"
fileToOutput= "/hdd3/Documents/temp/tempfile.conf"
fileToOutput = open( fileToOutput, 'w' )
#print "outfile = ", fileToOutput
for line in fileinput.input( fileToSearch ):
#fileToOutput.write( line.replace( textToSearchFor, textToReplaceWith ) )
slinee=""
sline=line[0:9]
if sline == "wallFName":
fileToOutput.write(newWallP)
else:
fileToOutput.write(line)
fileinput.close()
fileToOutput.close()