Skip to main content

A simple file search tools, you can easily sum all the files lines.

Project description

This is two function in this package, the first is visit and it visit all the file in the direction which you choose and the file whick you choose in type. It descriped as follow:
def visit(path,prex="",feature=print,istop=True):
[path] is the path you want to visit
[prex] is the suffix you want to filter, the default is "", that is means visit all
[feature] is the function you want to call, default to call the print function and print all the file name with the path,and you cant use it to call you own function
[is top] to check the call is the top level, you may not use it
eg. you can can is like this -- visit(".","py",lines)
and if you just import visitor you can write like this -- visitor.visit(".","py",visitor.lines)
any problem or advice mailto, thank you.
An other function is line(), it sum the line all the file, and you can realize you own method by the name parameter and it will call by visit(). It descriped as follow:
def lines(file_name):
This functon is to count the line in the file
[file_name] is the single file you want to visitor

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for file_visitor, version 0.1.11
Filename, size File type Python version Upload date Hashes
Filename, size (1.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page