Вариантов много.
2) ipython
centos: yum install python-ipython-console
debian: apt-get install ipython
Может быть частью функционала в vim.
| 123456789101112131415161718192021 |
|
| 123 |
|
=========== funcs.lua
function fsize (file)
local current = file:seek() -- get current position
local size = file:seek("end") -- get file size
file:seek("set", current) -- restore position
return size
end
=========== checklibs.lua
dofile("funcs.lua")
libs_file = io.open("librt.so.0","r")
print(fsize(libs_file))
libs_file:close()
===========
http://lua-users.org/lists/lua-l/2011-04/msg00785.html
Вероятный оригинал
http://www.lua.org/pil/21.3.html
В таком виде и гуляет функция fsize, даже с nginx связали
https://gist.github.com/perusio/2133228
location ~* \.(?:gif|jpe?g|png)$ {set_by_lua $img_file_size 'function fsize (file)local current = file:seek() -- get current positionlocal size = file:seek("end") -- get file sizefile:seek("set", current) -- restore positionreturn sizeendfsize(ngx.var.request_filename)';}