<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><P>On 3/28/07, Tony Mannucci <Tony.Mannucci@jpl.nasa.gov> wrote:<BR>> When I execute the run magic command, I cannot tell what search path<BR>> is being used. Is it possible to use associate a search path to<BR>> "run"? In the version I am running (0.7.2) run does not search<BR>> sys.path.<BR>><BR>> Thanks for your help!<BR><BR>I'm a long-term Matlab user relatively new to Python and IPython (and LOVING it!), and I was disappointed with the run command not using the same search path as imports. So I copied and modified the run magic command and saved it as my own "rrun" magic command. I replaced the call to get_py_filename with my a search of the current directory and then in sys.path. Ultimately I'd rather get_py_filename did it the way I wanted, so everything that uses it could
benefit - but I couldn't figure out how to do that without modifying the distributed code.</P>
<P> </P>
<P>Not sure what the protocol is for sharing code through this email chain, but I'd be glad to provide the simple code mod I did to anyone interested.</P>
<P> </P>
<P>I suspect the fact that the run command doesn't do what I wanted has a somewhat philosophical source, but if possible I'd sure love it if this change got incorporated into IPython - I don't see any negative side effect.</P>
<P> </P>
<P>- jvl</P></div><br>
<hr size=1><a href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/">Never miss an email again!<br>Yahoo! Toolbar</a> alerts you the instant new Mail arrives.<a href="
http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/"> Check it out.</a></body></html>