Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from lxml import etree
- Ser = " "
- sock = " "
- pseud = " "
- passs = " "
- print "Script de Configuration du bot"
- Ser = raw_input ("Ip ou adresse du serveur IRC\n")
- sock = raw_input ("Numero de Socket\n")
- pseud = raw_input ("Pseudo\n")
- passs = raw_input ("Password\n")
- ConfigBot = etree.Element("ConfigBot")
- Serveur = etree.SubElement(ConfigBot,"Serveur")
- Serveur.text = Ser
- Port = etree.SubElement(ConfigBot,"Port")
- Port.text = sock
- Pseudo = etree.SubElement(ConfigBot,"Pseudo")
- Pseudo.text = psu
- Password = etree.SubElement(ConfigBot,"Password")
- Password.text = passs
- print " Configuration fini"
- fichier = open("config.xml", "a")
- fichier.write(etree.tostring(ConfigBot, pretty_print=True))
- fichier.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement