changed shutil to return strings rather than straight-up print stuff

This commit is contained in:
Izaya 2017-06-12 14:39:06 +00:00
parent b54a2c0390
commit c1e9e31cf0

View File

@ -1,12 +1,12 @@
function ps()
local S=""
for k,v in pairs(tT) do
write("pid: "..tostring(k).."\tname: "..tostring(v[1]).."\tenv={")
for l,w in pairs(v[3]) do write(tostring(l).." = "..tostring(w)..", ") end
print("}")
S=S..("pid: "..tostring(k).."\tname: "..tostring(v[1]).."\tenv={")
for l,w in pairs(v[3]) do S=S..(tostring(l).." = "..tostring(w)..", ") end
S=S.."}\n"
end
return S
end
function mem()
print("Total:\t"..tostring(computer.totalMemory()/1024).."K")
print("Free:\t"..tostring(computer.freeMemory()/1024).."K")
print("Used:\t"..tostring((computer.totalMemory()-computer.freeMemory())/1024).."K")
return "Total:\t"..tostring(computer.totalMemory()/1024).."K\nFree:\t"..tostring(computer.freeMemory()/1024).."K\nUsed:\t"..tostring((computer.totalMemory()-computer.freeMemory())/1024).."K"
end