[SciPy-user] Namespace Questions

David Ascher scipy-user@scipy.net
Wed, 19 Feb 2003 22:18:39 -0800


Bill Alexander wrote:

>Chalk these up to the "I want it like Matlab" category...  My apologies
>for the length.
>
>What I'd like to do is invoke scripting commands from an interactive
>python session from the global namespace.  In Matlab, all m-file scripts
>are members of and operate within the invoking namespace, whereas
>functions create a private interior namespace for operation.  I want to
>be able to mimic the no-namespace-change scripts of Matlab from within
>the Python interactive shell.
>

Look at execfile()

--da