On 28May2014 21:48, Satish Muthali wrote:
This is what I went about doing:
reecalc = [s.split() for s in os.Popen("free -ht").read().splitlines()]
I think you dropped an "f" in your cut/paste. Try to be precise.
freecalc_total = freecalc[4]
freecalc_total = freecalc_total[3]
fre
Hello Experts,
I was able to figure this out after spending time reading the Python help docs.
This is what I went about doing:
> reecalc = [s.split() for s in os.Popen("free -ht").read().splitlines()]
> freecalc_total = freecalc[4]
> freecalc_total = freecalc_total[3]
> freecalc_total = freeca
Satish Muthali writes:
> so, this is what I have so far:
Thank you for presenting your code. Please ensure that you post in text
only, without transforming the characters from what you typed.
Something in your message composition process is currently converting
some ‘"’ (U+0022 QUOTATION MARK)
In Satish Muthali
writes:
> Now I want to feed the value for 'freecalc_total' as an argument to
> a command executed by the shell.
> For example:
> devnull = open(os.devnull, 'w')
> runCommand = subprocess.call(['stressapptest', ' the value of freecalc_total here>'], stdout=devnull,stderr=sub
Hello Experts,
I am trying to extract the available userspace+swap memory and then want to
feed this value as an argument to a tool that is executed in the shell.
so, this is what I have so far:
reecalc = [s.split() for s in os.Popen("free -ht").read().splitlines()]
freecalc_total = freecalc[4]