Subversion Repositories programming

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

#!/usr/bin/env python

import os
import string
import sys

# User Controlled variables #
program = "hsetroot -full "
fileName = sys.argv[1]

def main():
        if fileName == "-s":
                os.system("eval `cat ~/.bgrc`")
        else:
                setFile = file(os.getenv('HOME') + "/.bgrc","w")
                setFile.write(program + fileName)
                setFile.close()
                os.system(program + fileName)

if __name__ == "__main__":
        main()