search-file - *A python module providing tools for searching files(or directories).*
一个用于搜索文件或文件夹的Python模块。
:包含的函数 FUNCTIONS:
:directories(path):
- 一个生成器, 列出path下的所有子目录和文件名。
- 如:
.. code-block:: python
>>> from search_file import directories
>>> list(directories("C:"))
['C:\\Users', #第一层目录
'C:\\Users\\Administrator', #第二层目录
...,
'C:\\Windows',
'C:\\Windows\\System32',
...]
dirs: 是否列出目录
files: 是否列出文件
:search(filename,path,minsize=0,maxsize=None):
- 一个生成器,在path中搜索一个文件或文件夹。
- 如:
.. code-block:: python
>>> from search_file import search
>>> list(search("cmd.exe","C:"))
['C:\\Windows\\System32\\cmd.exe',
...]
:版本 VERSION:
1.2.3
源代码:https://github.com/qfcy/Python/blob/main/search_file.py
最近更新(2022-2):增加了多个测试程序。
作者:*七分诚意 qq:3076711200* 百度贴吧账号:qfcy\_
作者CSDN主页: https://blog.csdn.net/qfcy\_/
Raw data
{
"_id": null,
"home_page": "https://github.com/qfcy/Python/blob/main/search_file.py",
"name": "search-file",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "path, search, file, directories, automation",
"author": "\u4e03\u5206\u8bda\u610f qq:3076711200",
"author_email": "3076711200@qq.com",
"download_url": "https://files.pythonhosted.org/packages/d5/be/4e264e07b16b51ebc1f2649dc5f329b96fa98c505d0043c51222dca9703a/search-file-1.2.3.1.tar.gz",
"platform": null,
"description": "search-file - *A python module providing tools for searching files(or directories).*\r\n\u4e00\u4e2a\u7528\u4e8e\u641c\u7d22\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7684Python\u6a21\u5757\u3002\r\n\r\n:\u5305\u542b\u7684\u51fd\u6570 FUNCTIONS:\r\n\r\n:directories(path):\r\n\r\n- \u4e00\u4e2a\u751f\u6210\u5668, \u5217\u51fapath\u4e0b\u7684\u6240\u6709\u5b50\u76ee\u5f55\u548c\u6587\u4ef6\u540d\u3002\r\n- \u5982:\r\n\r\n.. code-block:: python\r\n\r\n >>> from search_file import directories\r\n >>> list(directories(\"C:\"))\r\n ['C:\\\\Users', #\u7b2c\u4e00\u5c42\u76ee\u5f55\r\n 'C:\\\\Users\\\\Administrator', #\u7b2c\u4e8c\u5c42\u76ee\u5f55\r\n ...,\r\n 'C:\\\\Windows',\r\n 'C:\\\\Windows\\\\System32',\r\n ...]\r\n\r\ndirs: \u662f\u5426\u5217\u51fa\u76ee\u5f55\r\nfiles: \u662f\u5426\u5217\u51fa\u6587\u4ef6\r\n\r\n:search(filename,path,minsize=0,maxsize=None):\r\n\r\n- \u4e00\u4e2a\u751f\u6210\u5668,\u5728path\u4e2d\u641c\u7d22\u4e00\u4e2a\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u3002\r\n- \u5982:\r\n\r\n.. code-block:: python\r\n\r\n >>> from search_file import search\r\n >>> list(search(\"cmd.exe\",\"C:\"))\r\n ['C:\\\\Windows\\\\System32\\\\cmd.exe',\r\n ...]\r\n\r\n:\u7248\u672c VERSION:\r\n\r\n 1.2.3\r\n\r\n\u6e90\u4ee3\u7801:https://github.com/qfcy/Python/blob/main/search_file.py\r\n\r\n\u6700\u8fd1\u66f4\u65b0(2022-2):\u589e\u52a0\u4e86\u591a\u4e2a\u6d4b\u8bd5\u7a0b\u5e8f\u3002\r\n\r\n\u4f5c\u8005:*\u4e03\u5206\u8bda\u610f qq:3076711200* \u767e\u5ea6\u8d34\u5427\u8d26\u53f7:qfcy\\_\r\n\r\n\u4f5c\u8005CSDN\u4e3b\u9875: https://blog.csdn.net/qfcy\\_/\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A python module providing tools for searching files (or directories).\u4e00\u4e2a\u7528\u4e8e\u641c\u7d22\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7684Python\u6a21\u5757\u3002",
"version": "1.2.3.1",
"project_urls": {
"Homepage": "https://github.com/qfcy/Python/blob/main/search_file.py"
},
"split_keywords": [
"path",
" search",
" file",
" directories",
" automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d5be4e264e07b16b51ebc1f2649dc5f329b96fa98c505d0043c51222dca9703a",
"md5": "dae1b60ff141e30b1dfc873edadb55ab",
"sha256": "a8a09d359138f2c81f0527eb2f229e10affabb791467721d77d9730e24ecf8a9"
},
"downloads": -1,
"filename": "search-file-1.2.3.1.tar.gz",
"has_sig": false,
"md5_digest": "dae1b60ff141e30b1dfc873edadb55ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4557,
"upload_time": "2024-06-21T01:00:17",
"upload_time_iso_8601": "2024-06-21T01:00:17.839489Z",
"url": "https://files.pythonhosted.org/packages/d5/be/4e264e07b16b51ebc1f2649dc5f329b96fa98c505d0043c51222dca9703a/search-file-1.2.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-21 01:00:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qfcy",
"github_project": "Python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "search-file"
}