Have you ever wondered where your python modules get imported from?
Here is a little script, called "pywhich", that will tell you.





--
\/ \/
(O O)
-- --------------------oOOo~(_)~oOOo----------------------------------------
Keith Dart <[EMAIL PROTECTED]>
public key: ID: F3D288E4 ============================================================================
#!/usr/bin/env python

"""pywhich <modname>
Tell which Python module is imported.
"""

import sys

def main(argv):
    if len(argv) < 2:
        print __doc__
        return
    for modname in argv[1:]:
        try:
            mod = __import__(modname)
        except:
            print "No module or package by named '%s' found." % modname
        else:
            print "%15s : %s" % (modname, mod.__file__)

main(sys.argv)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to