How to find imported modules

Gabriel Genellina gagsl-py2 at
Wed Oct 17 04:51:25 CEST 2007

En Tue, 16 Oct 2007 17:50:06 -0300, <kyosohma at> escribió:

> On Oct 16, 3:46 pm, Johny <pyt... at> wrote:

>> Now I need to find out which  of Programs imports a particular module
>> - module
>> Is that possible without opening each program?
> It is with grep on *nix, or you could download baregrep for windows,
> which is what I use when I need to know this sort of thing.

On Windows there is no need to download anything, you can use the findstr  

findstr /R /S /C:"import  *timesocket" /C:"from  *timesocket  *import" *.py

Gabriel Genellina

More information about the Python-list mailing list