<p>Hi, </p><p>I am new to IPython. I am looking for an extended macro. There are two problems with macros: </p><p>1) In 0.11 and 0.12 we have lost the ability to save macros.</p><p>2) Some of my macros are pretty complicated. I would like to be able create macros by using an editor insteas of typing them under the command prompt</p>
<p> </p><p>An alternative I am thinking about is to use %run file args. The problems with that are: 1) the args parameter is quite limited. I cannot pass variables to it; 2) it is a lot to type "run file args" every single time. </p>
<p>A third way is just to define a python function. For example:</p><p> </p><div>def my_command(param1):<br> s = Object(param1)<br> vw = View(s)<br> vw.show()</div><p> </p><div>The problem with this is that I want s and vw to be in the global namespace, so that after my_command finishes, I can still play with s and vw. So this does not work either.</div>
<div> </div><div>So, can you suggest some ways to handle this kind of need?</div><div> </div><div>Thanks,<br>Tom</div>