code: def saveVars(filename, varNamesStr, outOf=None, **opts):
      r
      filename, varnames, outOf = __saveVarsHelper(
          filename, varNamesStr, outOf, **opts)
      print "pickling:\n", "\n".join(sorted(varnames))
      try:
          f = None
  	f = open(filename, "wb")
  
  	cPickle.dump(dict(zip(varnames, atIndices(outOf, varnames))),
                       f, 1) # UGH: cPickle, unlike pickle doesn't accept bin=1
      finally:
          if f: f.close()
docs: r"""Pickle name and value of all those variables in `outOf` (default: all
      global variables (as seen from the caller)) that are named in
      `varNamesStr` into a file called `filename` (if no extension is given,
      '.bpickle' is appended). Overwrites file without asking, unless you
      specify `overwrite=0`. Load again with `loadVars`.
  
      Thus, to save the global variables ``bar``, ``foo`` and ``baz`` in the
      file 'savedVars' do::
  
        saveVars('savedVars', 'bar foo baz')