Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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 hanyueqi123@163.com, 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
'''
Release History

Release History

This version
History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
file_visitor-0.1.11.zip (1.5 kB) Copy SHA256 Checksum SHA256 Source Jan 29, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting