Re: pyfile command and __file__ attribute
- Hari Krishna Dara wrote:
> While using :pyfile to execute python script, the __name__ attribute isNo, I think that it's just a matter nobody finding out how to set
> set to "__main__" but __file__ is undefined. Is this intentional?
__file__ from inside Vim. Vim uses execfile(), it's unexpected that the
Python interpreter doesn't set __file__ automatically.
Save the plankton - eat a whale.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///