[Zope-dev] .zexp's

Zopista zopista@zopezen.org
Sun, 22 Apr 2001 18:59:01 -0700


Just ran into a problem with a newbie where they couldnt figure out where to
import the zexp, if its a product it should go in /Control_Panel/Products,
if not it should go in the ZODB. I couldn't think of an obvious way to tell,
so I just had a look in the zexp and came up with this:

file = open(infile, 'r')
if string.find(file.readline(), 'App.Product') >= 0:
    print "%s is a product zexp, go to Control_Panel" % infile

Can anyone think of a better way? It would be figure out where to stick this
in ExportImport.py so it would give nicer error messages...

Cheers
--
  Andy McKay