#!/usr/bin/python3.4
# -*-coding:Utf-8 -*
import os

class Log:
	def __init__(self, start, init):
		self.log = init
		if not os.path.exists(os.getcwd()+'/log/session '+start+'.log'):
			self.logFile = open(os.getcwd()+'/log/session '+start+'.log','w')
		else:
			self.logFile = open(os.getcwd()+'/log/session '+start+'.log','a')

		self.logFile.write(self.log)
		self.write('création du log\n')	
	
	def __del__(self):
		self.logFile.close()
		del(self.log)
		del(self.logFile)
	
	def __str__(self):
		return self.log
	
	def print(self):
		return print(self.log)
	
	def write(self, txt):
		self.logFile.write(txt)
		self.log += txt
	
	def iadd(self,txt):
		# l'opérateur += redirige vers Log.write()
		self.write(self,txt);




@@ -39,63 +39,351 @@
  -*%0A
-import os%0A%0Aclass Log:%0A%09def __init__(self, start, init):
+'''module who manage the log of the script'''%0Aimport os%0A%0Aclass Log:%0A%09'''class who manage the log of the script%0Athere is to log: %0A%09the file where is save the log at each new line,%0A%09the string who is print eache time that the standart output is erase'''%0A%09%0A%09def __init__(self, start, init):%0A%09%09'''initialize the log object and open the log file'''
 %0A%09%09s
@@ -610,16 +610,18 @@
 g','a')%0A
+%09%09
 %0A%09%09self.
@@ -701,16 +701,70 @@
 (self):%0A
+%09%09'''close the log file when the object is deleted'''%0A
 %09%09self.l
@@ -828,32 +828,58 @@
  __str__(self):%0A
+%09%09'''return string log'''%0A
 %09%09return self.lo
@@ -900,16 +900,38 @@
 (self):%0A
+%09%09'''print the log'''%0A
 %09%09return
@@ -972,16 +972,45 @@
 , txt):%0A
+%09%09'''add lines to the log'''%0A
 %09%09self.l
@@ -1074,50 +1074,57 @@
 :%0A%09%09
-# l'op%C3%A9rateur += redirige vers Log.write()
+'''redirect '+=' operator to the write()method'''
 %0A%09%09s

add comment and docstrings