How to derive import dependency structure

Harald Kirsch kirschh at lionbioscience.com
Fri Sep 21 06:28:46 EDT 2001


Let B.py be imported by A.py which generates --- in a very time
consuming process --- some data structure A.dat.

         import         generate
   B.py --------> A.py ----------> A.data

Currently A.dat is only generated if A.py is newer, but this is not
enough since A.dat must also be generated, if B.py is changed.

A.py and B.py is user written code and B.py represents in fact a more
complicated import-structure.

I could of course do some 'grep import A.py', but I guess there are
more pythonic solutions to find the dependency structure?

TIA,
  Harald Kirsch

-- 
----------------+------------------------------------------------------
Harald Kirsch   | kirschh at lionbioscience.com | "How old is the epsilon?"
LION bioscience | +49 6221 4038 172          |        -- Paul Erdös
       *** Please do not send me copies of your posts. ***



More information about the Python-list mailing list