euglug.org

[Eug-lug] More advanced procmail voodoo

작성자

카테고리:



Bob MillerThu Dec 15 11:54:24 PST 2005

horst wrote:

> Did I mention that you probably have to Ctrl-d out of the python -c '...' 
> command as Bob's example expects stdin (which you have to terminate)

Yes.  If I'd been writing for reuse, I would have put all the code in
a function body and used

    if __name__ == '__main__':
	my_func()

at the bottom of the file.

Then importing the file would have no side effects.

-- 
Bob Miller                              K<bob>
                                        kbob at jogger-egg.com