Re:EditREPL - Open Vim from within the Python REPL
by JulianWasTaken on Monday March 18, 2013 @12:50PM
(#5395370)
Oh, yeah, well, importing stuff on interpreter startup is pretty much exactly what $PYTHONSTARTUP is for :).
Re:EditREPL - Open Vim from within the Python REPL
by philipbjorge on Monday March 18, 2013 @12:52PM
(#5395389)
And this is why I post code online - to find out the right way to do things. PYTHONSTARTUP is exactly 100% what I was looking for, but didn't know existed.
But yours is able to do that because your importing a top-level edit function while I was pretty set on dynamically creating a vim() method and not having to import a function (just a module).
I love how yours lists the globals though! I might just have to bite that feature :).