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 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
'''

Project details


Download files

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

Source Distribution

file_visitor-0.1.11.zip (1.5 kB view details)

Uploaded Source

File details

Details for the file file_visitor-0.1.11.zip.

File metadata

  • Download URL: file_visitor-0.1.11.zip
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for file_visitor-0.1.11.zip
Algorithm Hash digest
SHA256 916858cf78f47f01afa090fbefb8bb778d469e9ba7bd47d64b9a135e87edf746
MD5 3178bc8cb11cfed3215d33c7ee27c376
BLAKE2b-256 42b8611234e81efd12106d5b8ca7acae56524d9c71bcbfd3610c77541e5affcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page