I still vote for the module solution, because you can import it into global namespace for debugging and testing.
While writing plugins being able to :py import my-module :py my-module.do_thing(foo) is important to me. Using execfile('file',{},{}) access to the namespace is lost which would force me to move almost all code into a module. So why not use a module in the first place? About "being vergin". Could we just proivde a clean() function which cleans a module namespace? for x in globals(): delete x People who want could use that then. When wirting plugins I never bothered about cleaning any environment. There are very rare cases when I have to - and then I restart Vim. Marc Weber -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.