Re: [BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread Noufal Ibrahim
babmis writes: [...] Really. Please use the body of the email for the message and the subject line for the subject. -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/

Re: [BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread Anand B Pillai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 03 September 2013 06:27 AM, Anand Chitipothu wrote: >> This is another version of this by mucking around directly with >> sys.exitfunc using a with context. >> >> from contextlib import contextmanager >> >> @contextmanager def end_of_days(

Re: [BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread Anand Chitipothu
> This is another version of this by mucking around directly > with sys.exitfunc using a with context. > > from contextlib import contextmanager > > @contextmanager > def end_of_days(): > def wrapper(): > print 'Goodbye.' > yield wrapper > > with end_of_days() as sys.exitfunc: >

Re: [BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread Anand B Pillai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 02 September 2013 08:09 PM, venkatakrishnan g wrote: > import atexit > > def callback(): print "about to exit!" > > atexit.register( callback ) Better use it as decorator. import atexit @atexit.register def last_man_standing(): print

Re: [BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread venkatakrishnan g
import atexit def callback(): print "about to exit!" atexit.register( callback ) On 2 September 2013 20:00, babmis wrote: > > __**_ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/**mailman/listinfo/bangpypers

[BangPypers] How to run a block of code just before the interpreter is being exited like END{} in perl ??

2013-09-02 Thread babmis
___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] [gsoc-india] Re: A BoF session about Google Summer of Code at PyConIndia tomorrow

2013-09-02 Thread Dhruv Baldawa
Hi, It was awesome meeting everyone at PyCon. Sarup, can you make the spreadsheet you created earlier public ? Everyone can add/update their details accordingly. -- Dhruv Baldawa (http://www.dhruvb.com) On Mon, Sep 2, 2013 at 5:09 PM, Anuj Deshpande wrote: > Could we have the group photo posted