equivalent of source command in tcl for python

Paddy3118 paddy3118 at googlemail.com
Thu Mar 19 06:02:58 CET 2009


On Mar 19, 4:42 am, Ralf Schoenian <r... at schoenian-online.de> wrote:
> mark.coll... at csiro.au wrote:
> > Many times I am developing a code in a file and I want to, for
> > example, exit at a specific line so that I can test something. In tcl
> > you can just put an exit command in and source the file. Is there an
> > equivalent for python? Thanks,
>
> Hi Mark,
>
> there is:
>
> import sys
> sys.exit()
>
> Ralf Schoenian

...Which is what I would use instead of typing 0/0 at a convenient
point, if I could fight my laziness :-)



More information about the Python-list mailing list