On Sa, 2014-03-08 at 16:20 -0800, Bryan Bishop wrote:
> what about:
> 
> with GED("filename1.g") as ged1:
>     with GED("filename2.g") as ged2:
>         ...
> Just curious if this is really single-process. Ideally we can get rid
> of the globals.

This will actually work already as it is :-)

The globals are there only for convenience of interactive use, in
scripts I wouldn't use them. The globals will only be set up if you
import * from brlcad.ged.

The drawbacks of the "with" version are:

 * all commands must be prefixed with the alias set up in "with ... as
alias" (ged1 and ged2 in your example);

 * in interactive use the whole "with" section will start executing only
when you finished writing it out completely;

So "with" is totally unpractical in interactive use in my opinion, but
it's great for scripts.

The globals in turn are great for interactive use.

Cheers,
Csaba