"sourcing" files

Alex Martelli aleax at aleax.it
Wed Jan 16 03:06:01 EST 2002


"Russ" <18k11tm001 at sneakemail.com> wrote in message
news:bebbba07.0201160000.4a4687d9 at posting.google.com...
> Tcl/Tk has a command called "source", which allows you to "include,"
> or paste in, the code from another file. That is, I can use
>
> source anotherfile.tcl
>
> to simply paste the code from anotherfile.tcl into the original file.
> Does Python have an equivalent capability? Thanks.

Python's built-in function execfile would seem to be roughly
the equivalent of Tcl's command source.


Alex






More information about the Python-list mailing list