#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module to manage task settings'''
import xml.etree.ElementTree as xmlMod
import os

class Task:
	'''class to manage task settings'''
	
	
	def __init__(self, xml= None):
		'''initialize task object with default settings or saved settings'''
		if xml is None:
			self.defaultInit()
		else:
			self.fromXml(xml)
	
	
	
	
	
	def defaultInit(self):
		'''initialize Task object with default settings'''
		self.path = None
		self.scene = None
	
	
	
	
	
	def fromXml(self, xml):
		'''initialize Task object with savedd settings'''
		self.path = xml.get('path')
		self.scene = xml.get('scene')
	
	
	
	
	
	def toXml(self):
		'''export task settings into xml syntaxed string'''
		return '<task path="'+self.path+'" scene="'+self.scene+'" />\n'
		
	
	
	
	
	
	def menu(self, log, index):
		'''method to edit task settings'''
		log.menuIn('task n°'+str(index))
		
		while True:
			log.print()
			
			choice= input('no action yet implement?').strip().lower()
			if choice in ['0', 'q', 'quit', 'cancel']:
				log.menuOut()# quit preferences menu
				return change
			else:
				log.error('Unknow request!', False)
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

@@ -190,24 +190,66 @@
 init__(self,
+ path = None, scene = None, preset = None,
  xml= None):
@@ -358,16 +358,35 @@
 ultInit(
+path, scene, preset
 )%0A%09%09else
@@ -435,24 +435,45 @@
 ultInit(self
+, path, scene, preset
 ):%0A%09%09'''init
@@ -530,20 +530,20 @@
 .path = 
-None
+path
 %0A%09%09self.
@@ -550,20 +550,44 @@
 scene = 
-None
+scene%0A%09%09self.preset = preset
 %0A%09%0A%09%0A%09%0A%09
@@ -728,16 +728,50 @@
 scene')%0A
+%09%09self.preset = xml.get('preset')%0A
 %09%0A%09%0A%09%0A%09%0A
@@ -903,16 +903,47 @@
 scene+'%22
+ preset=%22'%5C%0A%09%09%09%09+self.preset+'%22
  /%3E%5Cn'%0A%09

add preset new attribute to task and implement a way to create a task object with path, scene and preset argument