lr., 2010.eko ekaren 05a 08:52(e)an, Aymeric Mansoux(e)k idatzi zuen:
enrike said :
what about this?
du -sb /live/image | cut -f1
This cut splits the output of the pipe, after the 1st element, it would be
roughly translated in Python as:
output.split()[0]
thanks. i will leave this for later as it is in the live part of the
ifs. i am focusing now on making live device from an .iso
I know it calculates the size of the first partition but i am not
sure how, the cut -f1 confuses me. I am not sure i can translate
this line to python. I am now running it with os.popen and returning
the output of the subprocess.
BTW, os.popen is obsolete, check the subprocess module instead.
http://docs.python.org/library/subprocess.html
yes i know but i find easier to work using os.popen and os.system. when
i have something running i will change them to subprocess.Popen
i am getting very close to have the python version ready, next step
would be to add a GTK GUI to control it.
woohoo :D
---
[email protected]
http://identi.ca/group/puredyne
irc://irc.goto10.org/puredyne