Python1320

Untitled

Feb 2nd, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local function include(path)
  2.     if luadev2._func_table and luadev2._func_table[path] then
  3.         luadev2._func_table[path]()
  4.     end
  5. end
  6.  
  7. luadev2._func_table['testinclude.lua'] = function()
  8.     include("oh.lua")
  9.    
  10.     print(yeah)
  11.    
  12. end)
  13.  
  14. luadev2._func_table['oh.lua'] = function()
  15.     include("packagepath.lua")
  16.    
  17.     function string.oh(str, pattern)
  18.        
  19.         local tbl = {}
  20.         local index = 0
  21.        
  22.         for s in str:gmatch("?") do
  23.             tbl[index] = s
  24.         end
  25.        
  26.         PrintTable(tbl)
  27.     end
  28.    
  29.     string.oh("1*45*2+2923")
  30. end)
  31.  
  32. luadev2._func_table['packagepath.lua'] = function()
  33.     print(package.cpath)
  34. end)
  35.  
  36. luadev2._func_table['testinclude.lua']()
Add Comment
Please, Sign In to add comment