Thanks littlesat
usually do not like to use os.system because does not produce direct output ,stop, code execution and not stable.
but when i have to use os i prefer os.popen
a = os.popen("netstat")
>>> for line in a.readlines():
print line
but i learned if there two ways to do task one by python command and the other by enigma I prefer the enigma one because python is multi platform and and does not take into consideration the peculiarities os specific platform like enigma
never heard about
Console().ePopen(the_command_you_want_to_execute)
so i will use it future because it is enigma command so should better than os.popen
in general i prefer eConsoleAppContainer when possible because it does not stop the execution of code and work in background for long time process
self.container = eConsoleAppContainer()
self.destination="/"
cmd = "echo 'Configuring %s...' >> /tmp/ipkinstall.log" % fname
cmd = cmd + '; unzip -o ' + filename + ' -d ' + self.destination + ' >> /tmp/filestall.log'
self.container.appClosed.append(self.deflateOnClosed)
self.container.execute(cmd)
Veranderd door mfaraj57, 19 mei 2017 - 06:19