<commit_before>#!/usr/bin/env python

import ecto
import os
import pkgutil

usage = """ Prints the doc strings for a given ecto module.

ecto_doc.py [my_ecto_module]

where my_ecto_module is in the PYTHONPATH and is a ecto extension.
"""
if __name__ == '__main__':
    if len(os.sys.argv) == 2:
        module = os.sys.argv[1]
        m = __import__(module)
        ecto.list_ecto_module(m)
    else :
        print usage<commit_msg>Adding ecto_doc.py fix for ecto_opencv and recursive subdirectories.<commit_after>#!/usr/bin/env python

import ecto
import os
import pkgutil

usage = """ Prints the doc strings for a given ecto module.

ecto_doc.py [my_ecto_module]

where my_ecto_module is in the PYTHONPATH and is a ecto extension.
"""
if __name__ == '__main__':
    if len(os.sys.argv) == 2:
        module = os.sys.argv[1]
        m = __import__(module)
        ms = [(module,m)]
        for loader, module_name, is_pkg in  pkgutil.walk_packages(m.__path__):
            #print loader,module_name,is_pkg
            module = loader.find_module(module_name).load_module(module_name)
            ms.append((module_name,module))
        
        ecto_cells = []
        for module_name,x in ms:
            print "..",module_name
            ecto_cells += ecto.list_ecto_module(x)
        #print ecto_cells
        
    else :
        print usage
{'fraction_non_alphanumeric': 0.09799554565701558, 'fraction_numerical': 0.002969561989606533, 'mean_word_length': 2.6432432432432433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2928661', 'n_tokens_mistral': 483, 'n_tokens_neox': 455, 'n_words': 119}