Joao S. O. Bueno wrote on Sat, Jan 19, 2013 at 10:17:57 -0200: > Why not something along: > > with temp_dir("/tmp"): > # things that perform in /tmp > > # directory is restored. > > Of course that one function could do both things, > depending ob wether a <dir> parameter is passed. > +1