How to find imported modules
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Oct 16 22:51:25 EDT 2007
En Tue, 16 Oct 2007 17:50:06 -0300, <kyosohma at gmail.com> escribió:
> On Oct 16, 3:46 pm, Johny <pyt... at hope.cz> wrote:
>> Now I need to find out which of Programs imports a particular module
>> - module timesocket.py
>> 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
utility:
findstr /R /S /C:"import *timesocket" /C:"from *timesocket *import" *.py
--
Gabriel Genellina
More information about the Python-list
mailing list