equivalent of source <file> in python?

Emile van Sebille emile at fenx.com
Tue Aug 24 16:32:26 EDT 2010


On 8/24/2010 12:18 PM Astan Chee said...
> Hi,
> I'm trying to convert my tcsh script to python and am stuck at one part,
> particularly the part of the script that looks like this:
>
> #!/bin/tcsh
> setenv LSFLOG /var/tmp/lsf_log
> source /etc/setup
> unalias cp
> umask 0
> env >> ${AFLOG}
>
> What is the equivalent of doing this in python2.5?
> Thanks again


source == import *

Although that's generally considered non-pythonic.

Emile





More information about the Python-list mailing list