package.path = "/?;/?.lua;"..package.path _G.ERRLOG = {} _G.print = function(...) o = {} for ix = 1,select('#',...) do o[ix] = tostring(select(ix,...)) end table.insert(_G.ERRLOG,table.concat(o,"\n")) end local load_pnm = require("load_pnm").load local better_disp = require("better_disp") local perr = require("util").perr local function msgh(e) local tb = debug.traceback() return "uuuuuuuuuuuu" end local file,err = io.open(arg[1],"rb") perr(err,"io.open") local ff = file:read("a") local img = load_pnm(ff) local W = window.create(term.current(),20,10,20,20) W.clear() print("the") print(xpcall(function() better_disp.disp(W,img,1,1) end,msgh)) print("endthe") os.pullEvent("key") --shitty_disp.reset_palette(term.current())