Problems with modules

Steven Miale (
Mon, 25 Apr 1994 15:57:35 -0500

I'm working on a project which requires two Python files - one will
be a sort of 'library' which individual users will not change,
and the other can and will be user-changeable.

The problem is that both modules have information needed by the
other module. In this case, the user's module will look something
like this:

Rules = [('rec.arts.anime', SimpleGrep, AnimeRules)]

The library has to have 'Rules' defined in order to compile. But
Rules needs a definition of 'SimpleGrep' (from the library) in
order to compile.

Brief experiments with 'global' don't seem to do the trick. But if
I put everything into one file, it works.

Any ideas?



Steven Miale - | Don't blame me - 
Indiana University, Bloomington, IN  | I voted Libertarian.