{ "info": { "author": "Tyrone Zhao", "author_email": "tyrone-zhao@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Code Generators" ], "description": "# PySearcher\nPython\u5199\u7684\u641c\u7d22\u5f15\u64ce\uff0c\u652f\u6301\u5728\u7ed3\u679c\u96c6\u4e0a\u8fdb\u884c\u591a\u6b21\u641c\u7d22\u3002\u53ef\u4ee5\u641c\u7d22\u591a\u4e2a\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u591a\u79cd\u683c\u5f0f\u6587\u4ef6\uff0c\u53ef\u4ee5\u6307\u5b9a\u6587\u4ef6\u540d\u540e\u7f00\u3001\u8bbe\u7f6e\u7ed3\u679c\u5185\u5bb9\u5757\u7684\u957f\u5ea6\u3001\u6216\u8005\u901a\u8fc7PyCharm\u3001Vscode\u6216Sublime Text\u81ea\u52a8\u6253\u5f00\u6307\u5b9a\u6587\u4ef6\n\n## \u4f7f\u7528\u573a\u666f\n\u5f53\u4f60\u8bb0\u8fc7\u7b14\u8bb0\u4f46\u662f\u5fd8\u4e86\u6587\u4ef6\u540d\u53eb\u4ec0\u4e48\u7684\u65f6\u5019\uff1b\u5f53\u4f60\u6572\u8fc7\u4ee3\u7801\uff0c\u4f46\u662f\u4e0d\u77e5\u9053\u5728\u54ea\u4e2a\u6587\u4ef6\u91cc\u7684\u65f6\u5019\uff1b\u5f53\u4f60\u4ece\u7f51\u4e0a\u4e0b\u8f7d\u4e86\u8d44\u6599\uff0c\u4f46\u662f\u627e\u4e0d\u5230\u60f3\u8981\u627e\u7684\u5185\u5bb9\u7684\u65f6\u5019\uff1b\n\n## \u5b89\u88c5\n```shell\npip install --upgrade PySearcher\n```\n\n*\u76ee\u524d\u5df2\u7ecf\u652f\u6301python3\u53capython3+\n\n## \u600e\u4e48\u7528\uff1a\n\n*python3.7\u4ee5\u4e0b\u7248\u672c\u7528\u6237\u8bf7\u4f7f\u7528\u5982\u4e0b\u65b9\u5f0f\u5bfc\u5165\u6a21\u5757*\n```python\nfrom PySearcher import Searcher3\nSearcher3()\n```\n\n### \u9996\u6b21\u641c\u7d22\n\u6dfb\u52a0\u6307\u5b9a\u76ee\u5f55\uff0c\u5982\u5728\"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\"\u4e0b\u641c\u7d22, \u8981\u641c\u7d22\u7684\u5185\u5bb9\u4e3aprint\uff0c\u641c\u7d22\u7684\u6587\u4ef6\u7c7b\u578b\u4e3a.py\u6587\u4ef6\uff0c\u5148\u4e0d\u663e\u793a\u6587\u4ef6\u91cc\u7684\u5185\u5bb9\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"])\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61033 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c2\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a12.1 \u8ba4\u8bc6NumPy\u6570\u7ec4\u5bf9\u8c61ndarray.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c2\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a12.2 \u8ba4\u8bc6NumPy\u77e9\u9635\u4e0e\u901a\u7528\u51fd\u6570.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c2\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a12.3 NumPy\u6570\u503c\u8ba1\u7b97\u57fa\u7840.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c3\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c3\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c4\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c4\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c4\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a14.1 \u8bfb\u5199\u4e0d\u540c\u6570\u636e\u6e90\u7684\u6570\u636e.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c4\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a14.2 \u638c\u63e1DataFrame\u7684\u5e38\u7528\u64cd\u4f5c.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c4\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a14.3 \u8f6c\u6362\u4e0e\u5904\u7406\u65f6\u95f4\u5e8f\u5217\u6570\u636e.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c4\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a14.4 \u4f7f\u7528\u5206\u7ec4\u805a\u5408\u8fdb\u884c\u7ec4\u5185\u8ba1\u7b97.py \u7ed3\u679c\u6570\uff1a1\n....\n```\n\n### \u4e8c\u6b21\u641c\u7d22\n\u8fd9\u65f6\u6211\u4eec\u53d1\u73b0\u641c\u7d22\u5230\u7684\u7ed3\u679c\u592a\u591a\u4e86\uff0c\u60f3\u8981\u66f4\u7cbe\u786e\u7684\u641c\u7d22\uff0c\u8bb0\u5f97\u9664\u4e86print\u4e4b\u5916\uff0c\u8981\u641c\u7d22\u7684\u5185\u5bb9\u8fd8\u6709sklearn\uff0c\u90a3\u4e48\u6211\u4eec\u53ef\u4ee5\u5728search_datas\u4e2d\u589e\u52a0\u5b57\u7b26\u4e32\u6765\u8bbe\u7f6eSearcher\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"])\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61051 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c7\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a17.2 \u9884\u5904\u7406\u822a\u7a7a\u5ba2\u6237\u6570\u636e.py \u7ed3\u679c\u6570\uff1a1\n```\n\n### \u591a\u6b21\u641c\u7d22\n\u8fd9\u65f6\u6211\u4eec\u53d1\u73b0\u641c\u7d22\u5230\u7684\u7ed3\u679c\u8fd8\u662f\u592a\u591a\u4e86\uff0c\u60f3\u8981\u66f4\u7cbe\u786e\u7684\u641c\u7d22\uff0c\u8bb0\u5f97\u9664\u4e86print\u3001sklearn\u4e4b\u5916\uff0c\u8981\u641c\u7d22\u7684\u5185\u5bb9\u8fd8\u6709iris\uff0c\u90a3\u4e48\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"])\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61080 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n```\n\n### \u663e\u793a\u6587\u4ef6\u5185\u5bb9\n\u8fd9\u65f6\u7684\u641c\u7d22\u7ed3\u679c\u5df2\u7ecf\u5f88\u5c11\u4e86\uff0c\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\u6765\u663e\u793a\u6587\u4ef6\u7684\u5185\u5bb9\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 1, target=\"\", types=[\".py\"])\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61100 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n--- \u4ee5\u4e0b\u4e3a\u7b2c1\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\nt SVC\nfrom sklearn.metrics import classification_report\nsvm = SVC().fit(X_trainPca,y_train)\nprint('\u5efa\u7acb\u7684SVM\u6a21\u578b\u4e3a\uff1a\\n',svm)\ny_pred = svm.predict(X_testPca)\nprint('\u4f7f\u7528SVM\u9884\u6d4biris\u6570\u636e\u7684\u7ed3\u679c\u5206\u6790\u62a5\u544a\u4e3a\uff1a',classification_report(y_test,y_pred))\n```\n\n### \u663e\u793a\u66f4\u591a\u7684\u6587\u4ef6\u5185\u5bb9\n\u8fd9\u65f6\u6211\u4eec\u5df2\u7ecf\u770b\u5230\u4e86\u6587\u4ef6\u4e2d\u5305\u542b\u641c\u7d22\u5185\u5bb9\u7684\u201c\u7ed3\u679c\u5757\u201d\uff0c\u4f46\u662f\u8fd9\u4e2a\u201c\u7ed3\u679c\u5757\u201d\u663e\u793a\u7684\u6587\u4ef6\u7684\u5185\u5bb9\u592a\u5c11\u4e86\uff0c\u6211\u4eec\u60f3\u8981\u66f4\u591a\u7684\u663e\u793a\u5185\u5bb9\uff0c\u90a3\u4e48\u5c31\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\uff0c\u589e\u52a0\u7ed3\u679c\u5757\u7684\u5927\u5c0f\n\n*\u7ed3\u679c\u5757\u5927\u5c0f\u9ed8\u8ba4\u4e3a300\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a\u65e0\u9650\u5927*\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 1, target=\"\", types=[\".py\"], length=800)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61206 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n--- \u4ee5\u4e0b\u4e3a\u7b2c1\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\n####################################################################\n######################## \u7b2c3\u9898 ##########################\n###############################################################################\n\nfrom sklearn.svm import SVC\nfrom sklearn.metrics import classification_report\nsvm = SVC().fit(X_trainPca,y_train)\nprint('\u5efa\u7acb\u7684SVM\u6a21\u578b\u4e3a\uff1a\\n',svm)\ny_pred = svm.predict(X_testPca)\nprint('\u4f7f\u7528SVM\u9884\u6d4biris\u6570\u636e\u7684\u7ed3\u679c\u5206\u6790\u62a5\u544a\u4e3a\uff1a',classification_report(y_test,y_pred))\n```\n\n### \u6253\u5f00\u6307\u5b9a\u6587\u4ef6\n\u6b64\u65f6\u5982\u679c\u89c9\u5f97\u8bbe\u7f6e\u7ed3\u679c\u5757\u5927\u5c0f\u5df2\u4e0d\u80fd\u6ee1\u8db3\u4f60\uff0c\u90a3\u4e48\u4f60\u8fd8\u901a\u8fc7\u53ef\u4ee5\u8bbe\u7f6etarget\u53c2\u6570\u6253\u5f00\u6587\u4ef6\u3002\u76ee\u524d\u652f\u6301\u901a\u8fc7PyCharm\u3001Vscode\u6216Sublime\u6253\u5f00\uff0c\u4f18\u5148\u7ea7\u4ece\u524d\u5230\u540e\u3002\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\n\n*target\u53c2\u6570\u662f\u6a21\u7cca\u5339\u914d\uff0c\u5373\u8f93\u5165\u6587\u4ef6\u540d\u6216\u8def\u5f84\u7684\u4e00\u90e8\u5206\u5373\u53ef\uff0c\u5982\u679c\u6709\u591a\u4e2a\u6587\u4ef6\u540d\u5305\u542btarget\uff0c\u5219\u8fd9\u4e9b\u6587\u4ef6\u4f1a\u5168\u90e8\u6253\u5f00\u3002\u6bd4\u5982\u6211\u4eec\u60f3\u6253\u5f00\u641c\u7d22\u7ed3\u679c\u4e2d\u7684\u6240\u6709python\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u8bbe\u7f6etarget\u4e3atarget=\"py\"*\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 1, target=\"py\", types=[\".py\"], length=800)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61275 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a1\n\n\u540c\u65f6\uff0cPyCharm\u3001Vscode\u6216Sublime Text\u5728\u65b0\u6807\u7b7e\u9875\u4e2d\u6253\u5f00\u4e86\u8fd9\u4e2a\u6587\u4ef6\n```\n\n### \u641c\u7d22\u66f4\u591a\u7c7b\u578b\u7684\u6587\u4ef6\n\u5047\u5982\u9664\u4e86.py\u6587\u4ef6\u5916\uff0c\u6211\u4eec\u8fd8\u60f3\u641c\u7d22html\u6587\u4ef6\u53catxt\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"1\"\n]\n\nSearcher([\n \"./\",\n # \"../\",\n # \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\", \".html\", \".txt\"])\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61325 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1ae:\\code\\993dy.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\aiAssitant.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\BeautifulSoupComment.py \u7ed3\u679c\u6570\uff1a1\n......\n\u6587\u4ef6\u540d\uff1ae:\\code\\pyqt5\\vacabulary.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\baidu.html \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\bookmarks_2019_2_9.html \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\noUse.html \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\build\\movieDownload\\xref-movieDownload.html \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\chengji.txt \u7ed3\u679c\u6570\uff1a1\n......\n```\n\n### \u66f4\u591a\u7684\u641c\u7d22\u65b9\u5f0f\n\u5047\u5982\u5728\u641c\u7d22\u65f6\u6211\u4eec\u4e0d\u786e\u5b9a\u591a\u5927\u7684\u201c\u7ed3\u679c\u5757\u201d\u5185\u51fa\u73b0\u4e86\u8fd9\u4e9b\u8981\u641c\u7d22\u7684\u5185\u5bb9\uff0c\u53ea\u8bb0\u5f97\u4ed6\u4eec\u5728\u540c\u4e00\u4e2a\u6587\u4ef6\u91cc\u3002\u90a3\u4e48\u8981\u641c\u7d22\u4ed6\u4eec\u5219\u53ef\u4ee5\u901a\u8fc7result_type\u6765\u8bbe\u7f6eSearcher\n\n*result_type\u53c2\u6570\u4f1a\u628a\u591a\u6b21\u641c\u7d22\u4e2d\u7684\u6bcf\u4e00\u4e2a\u641c\u7d22\u5185\u5bb9\u5f53\u505a\u4e00\u4e2a\u7ed3\u679c\u5757\u3002\u5047\u5982\u4f60\u641c\u4e86\"print\"\u3001\"sklearn\"\u3001\"iris\"\uff0c\u90a3\u4e48\u6bcf\u4e00\u4e2a\u7ed3\u679c\u5757\u53ea\u5305\u542b\u5176\u4e2d\u4e4b\u4e00\u6216\u66f4\u591a\u3002\u4f46\u8fd9\u4e9b\u7ed3\u679c\u5757\u90fd\u5728\u540c\u4e00\u4e2a\u6587\u4ef6\u5185\u3002*\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"], result_type=True)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61500 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a3\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.1 \u4f7f\u7528sklearn\u8f6c\u6362\u5668\u5904\u7406\u6570\u636e.py \u7ed3\u679c\u6570\uff1a3\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.2 \u6784\u5efa\u5e76\u8bc4\u4ef7\u805a\u7c7b\u6a21\u578b.py \u7ed3\u679c\u6570\uff1a3\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.3 \u6784\u5efa\u5e76\u8bc4\u4ef7\u5206\u7c7b\u6a21\u578b.py \u7ed3\u679c\u6570\uff1a3\n```\n*\u6b64\u65f6\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u7ed3\u679c\u6570\u589e\u591a\u4e86\uff0c\u8fd9\u662f\u56e0\u4e3aresult_type=True\u540e\uff0c\u641c\u7d22\u7684\u65b9\u5f0f\u4ece\u57fa\u4e8e\"\u5757\"\u7684\u641c\u7d22\u53d8\u4e3a\u4e86\u57fa\u4e8e\u6587\u4ef6\u7684\u641c\u7d22\u3002\u5f53\u7136\u6211\u4eec\u4e5f\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6e\u201c\u5757\u201d\u5927\u5c0f\u6765\u4f7f\u5757\u641c\u7d22\u8f6c\u6362\u4e3a\u57fa\u4e8e\u6587\u4ef6\u7684\u641c\u7d22\uff0c\u5982length=1000000*\n\n### \u8fc7\u6ee4\u90e8\u5206\u6587\u4ef6\n\u5047\u5982\u5728\u641c\u7d22\u7ed3\u679c\u91cc\u51fa\u73b0\u4e86\u6211\u4eec\u4e0d\u60f3\u6bcf\u6b21\u641c\u7d22\u90fd\u663e\u793a\u7684\u6587\u4ef6\u600e\u4e48\u529e\uff1f\u53ef\u4ee5\u901a\u8fc7relist\u53c2\u6570\u6765\u8bbe\u7f6eSearcher, \u6bd4\u5982\u6211\u4eec\u60f3\u8fc7\u6ee4\u6389\u6587\u4ef6\u540d\u5305\u542b\u201c\u805a\u7c7b\u201d\u7684\u6587\u4ef6\n\n*relist\u53c2\u6570\u4f1a\u628a\u6587\u4ef6\u540d\u53ca\u8def\u5f84\u5185\u5305\u542b\u6307\u5b9a\u5b57\u7b26\u4e32\u7684\u6587\u4ef6\u90fd\u4ece\u641c\u7d22\u4e2d\u8fc7\u6ee4\u6389\uff01\u662f\u6a21\u7cca\u5339\u914d\uff01*\n```python\nrelist = [\n \"\u805a\u7c7b\"\n]\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"], result_type=True, relist=relist)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) E:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61836 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a3\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.1 \u4f7f\u7528sklearn\u8f6c\u6362\u5668\u5904\u7406\u6570\u636e.py \u7ed3\u679c\u6570\uff1a3\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.3 \u6784\u5efa\u5e76\u8bc4\u4ef7\u5206\u7c7b\u6a21\u578b.py \u7ed3\u679c\u6570\uff1a3\n```\n\n#### \u663e\u793a\u8fd9\u4e9b\u5185\u5bb9\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 1, target=\"\", types=[\".py\"], result_type=True)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\nE:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 61559 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4e60\u9898\u7a0b\u5e8f\\code\\\u7b2c6\u7ae0\u64cd\u4f5c\u9898.py \u7ed3\u679c\u6570\uff1a3\n--- \u4ee5\u4e0b\u4e3a\u7b2c1\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\nt SVC\nfrom sklearn.metrics import classification_report\nsvm = SVC().fit(X_trainPca,y_train)\nprint('\u5efa\u7acb\u7684SVM\u6a21\u578b\u4e3a\uff1a\\n',svm)\ny_pred = svm.predict(X_testPca)\nprint('\u4f7f\u7528SVM\u9884\u6d4biris\u6570\u636e\u7684\u7ed3\u679c\u5206\u6790\u62a5\u544a\u4e3a\uff1a',classification_report(y_test,y_pred))\n\n\n--- \u4ee5\u4e0b\u4e3a\u7b2c2\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\n##########################\n###############################################################################\n\nfrom sklearn.svm import SVC\nfrom sklearn.metrics import classification_report\nsvm = SVC().fit(X_trainPca,y_train)\nprint('\u5efa\u7acb\u7684SVM\u6a21\u578b\u4e3a\uff1a\\n',svm)\ny_pred = svm.predict(X_testPca)\nprint('\u4f7f\u7528SV\n\n\n--- \u4ee5\u4e0b\u4e3a\u7b2c3\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\nearn.metrics import classification_report\nsvm = SVC().fit(X_trainPca,y_train)\nprint('\u5efa\u7acb\u7684SVM\u6a21\u578b\u4e3a\uff1a\\n',svm)\ny_pred = svm.predict(X_testPca)\nprint('\u4f7f\u7528SVM\u9884\u6d4biris\u6570\u636e\u7684\u7ed3\u679c\u5206\u6790\u62a5\u544a\u4e3a\uff1a',classification_report(y_test,y_pred))\n\n\n\u6587\u4ef6\u540d\uff1aE:\\Python\\book\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\\\u7b2c6\u7ae0\\\u4efb\u52a1\u7a0b\u5e8f\\code\\\u4efb\u52a16.1 \u4f7f\u7528sklearn\u8f6c\u6362\u5668\u5904\u7406\u6570\u636e.py \u7ed3\u679c\u6570\uff1a3\n--- \u4ee5\u4e0b\u4e3a\u7b2c1\u6761\u7ed3\u679c ------------------------------------------------------------------------------------------------------------------------------------------------------\na.transform(boston_trainScaler)\n## \u5c06\u89c4\u5219\u5e94\u7528\u4e8e\u6d4b\u8bd5\u96c6\nboston_testPca = pca.transform(boston_testScaler)\nprint('\u964d\u7ef4\u540eboston\u6570\u636e\u96c6\u6570\u636e\u6d4b\u8bd5\u96c6\u7684\u5f62\u72b6\u4e3a\uff1a',boston_trainPca.shape)\nprint('\u964d\u7ef4\u540eboston\u6570\u636e\u96c6\u6570\u636e\u8bad\u7ec3\u96c6\u7684\u5f62\u72b6\u4e3a\uff1a',boston_testPca.shape)\n\n......\n```\n\n### \u66f4\u591a\u7684\u7f16\u7801\u683c\u5f0f\nPySearcher\u76ee\u524d\u652f\u6301\u7684\u7f16\u7801\u683c\u5f0f\u4e3a\"utf-8\"\u548c\"latin-1\"\uff0c\u5982\u679c\u5728\u641c\u7d22\u76ee\u5f55\u4e0b\u5b58\u5728\u7279\u6b8a\u7684\u7f16\u7801\u683c\u5f0f\u7684\u6587\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0\u7f16\u7801\u683c\u5f0f\uff0c\u4e3aSearcher\u8bbe\u7f6eencoding\u53c2\u6570\u3002\n\n```python\nencoding = [\n # \"iso-8859-1\"\n]\n\nrelist = [\n \"\u805a\u7c7b\"\n]\n\nsearch_datas = [\n \"hommes\",\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n # \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n \"E:\\Python\\python3\"\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"], result_type=True, relist=relist, encoding=encoding)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) E:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 49904 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n......\nE:\\Python\\python3\\Lib\\test\\encoded_modules\\module_iso_8859_1.py\n'utf-8' codec can't decode byte 0xe9 in position 89: invalid continuation byte\nE:\\Python\\python3\\Lib\\test\\encoded_modules\\module_koi8_r.py\n'utf-8' codec can't decode byte 0xf0 in position 61: invalid continuation byte\n\u6587\u4ef6\u540d\uff1aE:\\Python\\python3\\Lib\\test\\encoded_modules\\__init__.py \u7ed3\u679c\u6570\uff1a1\nE:\\Python\\python3\\Tools\\i18n\\pygettext.py\n'utf-8' codec can't decode byte 0xfc in position 231: invalid start byte\n\n......\n```\n\n### \u8bbe\u7f6e\u7f16\u7801\u683c\u5f0f\n\n\u5982\u4e0a\u6240\u793a\uff0c\u5f53\u7f16\u7801\u683c\u5f0f\u4e0d\u80fd\u8bfb\u53d6\u5bf9\u5e94\u6587\u4ef6\u65f6\uff0cPySearcher\u4f1a\u5728\u7ed3\u679c\u5c55\u793a\u884c\u663e\u793a\u8bfb\u53d6\u5931\u8d25\u7684\u6587\u4ef6\u53ca\u5bf9\u5e94\u9519\u8bef\uff0c\u8fd9\u65f6\u53ef\u4ee5\u624b\u52a8\u6765\u4e3aPySearcher\u6dfb\u52a0\u66f4\u591a\u7684\u7f16\u7801\u683c\u5f0f\u3002\n\n```python\nencoding = [\n \"iso-8859-1\"\n]\n\nrelist = [\n \"\u805a\u7c7b\"\n]\n\nsearch_datas = [\n \"print\",\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n # \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n \"E:\\Python\\python3\"\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"], result_type=True, relist=relist, encoding=encoding)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) E:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 50148 e:\\code\\PySearcher_upload\\PySearcher\\PySearcher.py \"\n\u6587\u4ef6\u540d\uff1aE:\\Python\\python3\\Lib\\test\\encoded_modules\\module_iso_8859_1.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1aE:\\Python\\python3\\Lib\\test\\encoded_modules\\__init__.py \u7ed3\u679c\u6570\uff1a1\n\n......\n```\n\n### \u76f4\u63a5\u641c\u7d22\u6587\u4ef6\u540d\u79f0\n\n\u5f53\u6211\u4eec\u4e0d\u60f3\u641c\u7d22\u6587\u4ef6\u5185\u5bb9\uff0c\u800c\u60f3\u5728\u6587\u4ef6\u540d\u4e2d\u641c\u7d22\u65f6\uff0c\u6bd4\u5982\u60f3\u641c\u6587\u4ef6\u540d\u4e2d\u5e26\u6709\"bz\"\u3001\"2\"\u7684\u6587\u4ef6\u65f6\uff0c\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6eSearcher\u3002\n\n```python\nsearch_datas = [\n \"bz\",\n \"2\"\n]\n\nSearcher([\n \"./\",\n # \"../\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"], filename=True)\n```\n**\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b**\n```\n(base) e:\\code>cd e:\\code && cmd /C \"set \"PYTHONIOENCODING=UTF-8\" && set \"PYTHONUNBUFFERED=1\" && E:\\anaconda\\python c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2019.1.0\\pythonFiles\\ptvsd_launcher.py --default --client --host localhost --port 49429 e:\\code\\PySearcher_upload\\PySearcher\\__init__.py \"\n\u6587\u4ef6\u540d\uff1ae:\\code\\Python-3.7.2\\Lib\\bz2.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\Python-3.7.2\\Lib\\encodings\\bz2_codec.py \u7ed3\u679c\u6570\uff1a1\n\u6587\u4ef6\u540d\uff1ae:\\code\\Python-3.7.2\\Lib\\test\\test_bz2.py \u7ed3\u679c\u6570\uff1a1\n```\n\n\n## \u53c2\u6570\u4ecb\u7ecd\n- Searcher(self, paths=[\"./\"], search_datas=[], display=True, target=\"\",\n relist=[], length=300, types=[\".py\"], result_type=False,\n encoding=[\"utf-8\", \"latin-1\"], filename=False):\n- paths = list -> \u53ef\u4ee5\u5b58\u653e\u591a\u4e2a\u6307\u5b9a\u76ee\u5f55\u7684\u5217\u8868\n- search_datas = list -> \u8fdb\u884c\u591a\u6b21\u641c\u7d22\u7684\u6570\u636e\uff0c\u5b57\u7b26\u4e32\u5217\u8868\u8868\u793a\n- display = bool -> \u662f\u5426\u663e\u793a\u67e5\u8be2\u5230\u7684\u6587\u4ef6\u5185\u5bb9\uff0c\u4e3a0\u7684\u8bdd\u53ea\u663e\u793a\u6587\u4ef6\u540d\u548c\u7ed3\u679c\u6570\n- target = string -> \u5982\u679c\u641c\u7d22\u7ed3\u679c\u4e0d\u4e3a\u7a7a\u7684\u8bdd\uff0c\u53ef\u4ee5\u7528target\u6307\u5b9a\u90e8\u5206\u6587\u4ef6\u540d\u3002\u7a0b\u5e8f\u4f1a\u901a\u8fc7PyCharm\u3001Vscode\u6216sublime\u6253\u5f00\u641c\u7d22\u7ed3\u679c\u4e2d\u7684\u6587\u4ef6(\u6587\u4ef6\u540d\u4e2d\u5305\u542btarget\u7684\u6587\u4ef6\uff09\uff0c\u5426\u5219\u6253\u5f00\u6240\u6709\u6587\u4ef6\u540d\u4e2d\u5305\u542btarget\u7684\u6587\u4ef6\n- relist = list -> \u9700\u8981\u8fc7\u6ee4\u7684\u6587\u4ef6\u53ca\u7279\u6b8a\u7f16\u7801\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u53ea\u5199\u90e8\u5206\u8def\u5f84\u5185\u5bb9(\u6b64\u5904\u4e3a\u5168\u8def\u5f84\u8fc7\u6ee4)\uff0c\u5b57\u7b26\u4e32\u5217\u8868\u683c\u5f0f\n- length = int -> \u8bbe\u7f6e\u8f93\u51fa\u7ed3\u679c\u5757\u7684\u5757\u5927\u5c0f\n- types = list -> \u8981\u67e5\u8be2\u7684\u6587\u4ef6\u7c7b\u578b\u540e\u7f00\uff0c\u5982[\".py\", \".html\", \".cpp\"]\n- result_type = bool -> \u663e\u793a\u7684\u7ed3\u679c\u7c7b\u578b\uff0c\u53ef\u4ee5\u7528\u6765\u4fee\u6539\u7ec8\u7aef\u8f93\u51fa\u7ed3\u679c\u5757\u7684\u5185\u5bb9\u3002\n \u4e3aTrue\u65f6\u663e\u793a\u4e00\u4e2a\u6587\u4ef6\u5185\u7684\u6240\u6709\u7ed3\u679c\u5757\uff0c\u8fd9\u4e9b\u7ed3\u679c\u5757\u53ea\u5305\u542b\u591a\u4e2a\u641c\u7d22\u5185\u5bb9\u4e2d\u7684\u4e00\u4e2a\u3002\n \u4e3aFalse\u65f6\u663e\u793a\u5728\u4e00\u4e2a\u7ed3\u679c\u5757\u5927\u5c0f\u5185\uff0c\u540c\u65f6\u5305\u542bsearch_datas\u4e2d\u641c\u7d22\u5185\u5bb9\u7684\u7ed3\u679c\u5757\u3002\n- encoding = list -> \u7f16\u7801\u683c\u5f0f\u8bbe\u7f6e\u53c2\u6570\uff0cPySearcher\u9ed8\u8ba4\u652f\u6301\"utf-8\"\u53ca\"latin-1\"\u7f16\u7801\u3002\n- filename = bool -> \u662f\u5426\u53ea\u67e5\u8be2\u6587\u4ef6\u540d\uff0cTrue\u4e3a\u53ea\u67e5\u8be2\u6587\u4ef6\u540d\uff08\u975e\u8def\u5f84\uff09\u4e2d\u5305\u542bsearch_dates\u7684\u6587\u4ef6\u3002\n \u4e3aFalse\u65f6\uff0c\u67e5\u8be2\u6587\u4ef6\u5185\u5bb9\u3002\n\n\n## \u7248\u672c\u66f4\u65b0\n- \u5f00\u53d1\u4e2d\u7248\u672c\uff1aV2.0.1 \u66f4\u65b0\u5185\u5bb9:\n\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5927\u5c0f\u5199\u5339\u914d\uff0c\u4ee5\u53ca\u5168\u5b57\u5339\u914d\uff0c\u589e\u52a0Linux\u5e73\u53f0\u6253\u5f00\u6587\u4ef6\u652f\u6301\n- \u5f53\u524d\u7248\u672c\uff1aV1.7.1 \u66f4\u65b0\u8bb0\u5f55\uff1a\n\u589e\u52a0\u901a\u8fc7PyCharm\u76f4\u63a5\u6253\u5f00\u6587\u4ef6\u7684\u529f\u80fd\n- \u7248\u672c\uff1aV1.6.8 \u66f4\u65b0\u8bb0\u5f55:\n\u589e\u52a0Mac\u5e73\u53f0\u53caWindows\u5e73\u53f0\u6253\u5f00\u6587\u4ef6\u652f\u6301\n- \u7248\u672c\uff1aV1.5.8 \u66f4\u65b0\u8bb0\u5f55:\n\u589e\u52a0\u76f4\u63a5\u641c\u7d22\u6587\u4ef6\u540d\u7684\u529f\u80fd\n- \u7248\u672c\uff1aV1.4.4 \u66f4\u65b0\u8bb0\u5f55:\n\u589e\u52a0Python3\u6240\u6709\u7248\u672c\u7684Python\u517c\u5bb9\u652f\u6301\n- \u7248\u672c\uff1aV1.3.4 \u66f4\u65b0\u8bb0\u5f55:\n\u589e\u52a0encoding\u53c2\u6570\uff0c\u652f\u6301\u6269\u5c55\u66f4\u591a\u7684\u7f16\u7801\u683c\u5f0f\u3002\n\n**Python searching engine, support for a second searching on the result set. Can search things in multiple directories, could open the file automatelly and setting the length of the result.**\n\n## Installation\n```shell\npip install --upgrade PySearcher\n```\n\n## Example:\n*Python3.7- users are advised to import modules in the following manner, with the Searcher Settings consistent with what is described below*\n```python\nfrom PySearcher import Searcher3\nSearcher3()\n```\n\n*Python3.7+*\n```python\nfrom PySearcher import Searcher\n\n\nsearch_datas = [\n \"print\",\n \"sklearn\",\n \"iris\"\n]\n\nSearcher([\n # \"./\",\n # \"../\",\n \"E:\\\\Python\\\\book\\\\Python\u6570\u636e\u5206\u6790\u4e0e\u5e94\u7528\",\n # \"/Library/Frameworks/Python.framework/Version/\"\n], search_datas, 0, target=\"\", types=[\".py\"])\n```\n\n- Searcher(self, paths=[\"./\"], search_datas=[], display=True, target=\"\",\n relist=[], length=300, types=[\".py\"], result_type=False,\n encoding=[\"utf-8\", \"latin-1\"], filename=False):\n- paths = list-> Can hold lists of multiple specified directories.\n- search_datas = list -> Data search for many times, using string to represent.\n- display = bool-> Displays the contents of the file being queried. If it is 0, only the file name and the number of results will be printed.\n- target = string-> If the search_data is not empty, open the file (or part of filepath) base on the search result which's filepath contains the \"target\".And printing everything in it. Otherwise opening all the files which's filepath contains \"target\" through \"PyCharm\"\u3001\"VScode\" or \"Sublime Text\".\n- relist = list-> The file that needs to be filtered(can only write partial filepath). list of string.\n- length = int -> block size of file's content to be printed. \n- types = list -> The suffix names of the file to search. For example: [\".py\", \".html\", \".cpp\"]\n- result_type = bool -> The type of result block displayed that can be used to modify the contents of the terminal output result block.\n When True, displays all result blocks which in a file that contain only one of search_datas.\n When False, it is displayed in a result block which contains all of search_datas.\n- encoding = list -> Encoding format parameters. PySearcher supports \"utf-8\" and \"latin-1\" encoding by default.\n- filename = bool -> Querying only for filenames, True only search in filename (non-path).When False, query the content of files.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Tyrone-Zhao/PySearcher", "keywords": "code search tools", "license": "", "maintainer": "", "maintainer_email": "", "name": "PySearcher", "package_url": "https://pypi.org/project/PySearcher/", "platform": "", "project_url": "https://pypi.org/project/PySearcher/", "project_urls": { "Blog": "https://blog.csdn.net/weixin_41845533", "Homepage": "https://github.com/Tyrone-Zhao/PySearcher" }, "release_url": "https://pypi.org/project/PySearcher/1.7.2.post2/", "requires_dist": null, "requires_python": "", "summary": "Python Search Engine", "version": "1.7.2.post2" }, "last_serial": 4920428, "releases": { "1.6.9": [ { "comment_text": "", "digests": { "md5": "3776d69f562c8598c96f2b380c6892fa", "sha256": "270148f0310109224903e02f5e5aea764a911a03feb10cf3b2c275361901ddfe" }, "downloads": -1, "filename": "PySearcher-1.6.9-py3-none-any.whl", "has_sig": false, "md5_digest": "3776d69f562c8598c96f2b380c6892fa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15447, "upload_time": "2019-02-28T20:43:38", "url": "https://files.pythonhosted.org/packages/fb/a7/349c97afb13f798f0aea9f3aea4ae32e826ab71cb69196fe4ec7fc516639/PySearcher-1.6.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fe91ef87e754410fdc98408a01a4e27a", "sha256": "d8fdba2e4bc1b6c85cd38a3ac8afe3e058fa27c543bce0da1b2c2a5a37ee91a8" }, "downloads": -1, "filename": "PySearcher-1.6.9.tar.gz", "has_sig": false, "md5_digest": "fe91ef87e754410fdc98408a01a4e27a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18694, "upload_time": "2019-02-28T20:43:40", "url": "https://files.pythonhosted.org/packages/f5/fb/ee3c885464647542f27516ab7d87b02108bb98e2d64aff0eaf062574675b/PySearcher-1.6.9.tar.gz" } ], "1.7.0": [ { "comment_text": "", "digests": { "md5": "6fd84eb1d286c7eda34bd8220d5d0fb6", "sha256": "89fca284301e3f7934602bca3549cb24785fde3e4c218dbb47ea3e0e8c0b8f19" }, "downloads": -1, "filename": "PySearcher-1.7.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6fd84eb1d286c7eda34bd8220d5d0fb6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15453, "upload_time": "2019-02-28T20:47:14", "url": "https://files.pythonhosted.org/packages/6d/ad/b9d42a4625b20c0408f6a751cb80c3a33e02a345ccddfeea05d1f69d7ca8/PySearcher-1.7.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9c2e211a3b2cc5de432f0d75b5b2212", "sha256": "50acd39b502b2eac329b58eab9524a087d0486e3d1a8a62612775ce7fa38c175" }, "downloads": -1, "filename": "PySearcher-1.7.0.tar.gz", "has_sig": false, "md5_digest": "a9c2e211a3b2cc5de432f0d75b5b2212", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18691, "upload_time": "2019-02-28T20:47:16", "url": "https://files.pythonhosted.org/packages/d0/b6/6e551b0776641b44e29d1e54ebaa01bd964fd4a0728d5cfecc542660eb49/PySearcher-1.7.0.tar.gz" } ], "1.7.1": [ { "comment_text": "", "digests": { "md5": "85ad037bc00647e82da27bea91b04e5e", "sha256": "7b518b8597eeed323055bc3e735bfa3f978d71526526001fd77d2dc561952ba0" }, "downloads": -1, "filename": "PySearcher-1.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "85ad037bc00647e82da27bea91b04e5e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15401, "upload_time": "2019-03-10T04:20:52", "url": "https://files.pythonhosted.org/packages/39/d4/28e87c0859592fceed70dc6a80ac9cf210505c9ae963d66187f65c34bce4/PySearcher-1.7.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2cae2d35688e4ff7ee0ae74ac0a65e44", "sha256": "b7403cb1d48da5510d24b1743486f1ab8eb43e986475ea3cc0b6ece80940dd8e" }, "downloads": -1, "filename": "PySearcher-1.7.1.tar.gz", "has_sig": false, "md5_digest": "2cae2d35688e4ff7ee0ae74ac0a65e44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18800, "upload_time": "2019-03-10T04:20:54", "url": "https://files.pythonhosted.org/packages/88/52/1f66f8d6831e6db9161247e416424a85b9bb80c086be056de6abc27f9918/PySearcher-1.7.1.tar.gz" } ], "1.7.2": [ { "comment_text": "", "digests": { "md5": "371685ca40a9753621b6596f34feaaad", "sha256": "fbc3d231ef9e8c54ceac66e2e2f8c1e3081d98414743ba3eb9321e45673a7abb" }, "downloads": -1, "filename": "PySearcher-1.7.2-py3-none-any.whl", "has_sig": false, "md5_digest": "371685ca40a9753621b6596f34feaaad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15405, "upload_time": "2019-03-10T04:24:38", "url": "https://files.pythonhosted.org/packages/f7/e9/c47d4723d6af13317df3e27874af1dd09530cdf29f58da30d0182493b681/PySearcher-1.7.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad1a2e5f334f9e953d3dfc5f232b1fd6", "sha256": "37d0c67b398a0c9f44a11097870f302be3aeac9e860ac764a9e747d6ad05e240" }, "downloads": -1, "filename": "PySearcher-1.7.2.tar.gz", "has_sig": false, "md5_digest": "ad1a2e5f334f9e953d3dfc5f232b1fd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18802, "upload_time": "2019-03-10T04:24:40", "url": "https://files.pythonhosted.org/packages/49/d3/9a739744e077508527fdc6825ec16296172615b7f6c82866fd24de21dddc/PySearcher-1.7.2.tar.gz" } ], "1.7.2.post1": [ { "comment_text": "", "digests": { "md5": "789d81ba239cc1c58f38b036864fc0b2", "sha256": "a75640df53bc4681389e4875e2b4de767c472f48e4c5051b6d4e7be26e02d2fd" }, "downloads": -1, "filename": "PySearcher-1.7.2.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "789d81ba239cc1c58f38b036864fc0b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15480, "upload_time": "2019-03-10T04:35:51", "url": "https://files.pythonhosted.org/packages/6b/f4/8e155b835e0c293742fa879912654b674795e4244815de7058a7dee4a42c/PySearcher-1.7.2.post1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30548bc1873b7b228bea68f66072be49", "sha256": "4a2e52b1aac9f7b65e7acbbc1117d83329055e996535a88f8ef97d06f16eb68b" }, "downloads": -1, "filename": "PySearcher-1.7.2.post1.tar.gz", "has_sig": false, "md5_digest": "30548bc1873b7b228bea68f66072be49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18828, "upload_time": "2019-03-10T04:35:53", "url": "https://files.pythonhosted.org/packages/a8/b4/3dbf6b0588b585a05b49f0473ebd7e1af3f825ef036068092d5d9f92e4aa/PySearcher-1.7.2.post1.tar.gz" } ], "1.7.2.post2": [ { "comment_text": "", "digests": { "md5": "5f543029aa1184a56547e151a2c50211", "sha256": "9cdcd63671386c510e72a8a6a65f9177d3a86d0a1ea2d8ff92dda3ada1dafd96" }, "downloads": -1, "filename": "PySearcher-1.7.2.post2-py3-none-any.whl", "has_sig": false, "md5_digest": "5f543029aa1184a56547e151a2c50211", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15484, "upload_time": "2019-03-10T04:42:23", "url": "https://files.pythonhosted.org/packages/9f/e5/53968b76012cc67fe1db72b89327bea5113669d69098085c067c5fefbfd2/PySearcher-1.7.2.post2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f77194de2518a3e69bc2df8407b50c6", "sha256": "bd2a695877602243ef5d464ad0f86ec9ebf4e7612f1f7243dc8ccce0923603fe" }, "downloads": -1, "filename": "PySearcher-1.7.2.post2.tar.gz", "has_sig": false, "md5_digest": "9f77194de2518a3e69bc2df8407b50c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18837, "upload_time": "2019-03-10T04:42:25", "url": "https://files.pythonhosted.org/packages/4d/32/912bd61e86c033215b460424cd883f2702b5a5471f363a006564d5791699/PySearcher-1.7.2.post2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f543029aa1184a56547e151a2c50211", "sha256": "9cdcd63671386c510e72a8a6a65f9177d3a86d0a1ea2d8ff92dda3ada1dafd96" }, "downloads": -1, "filename": "PySearcher-1.7.2.post2-py3-none-any.whl", "has_sig": false, "md5_digest": "5f543029aa1184a56547e151a2c50211", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15484, "upload_time": "2019-03-10T04:42:23", "url": "https://files.pythonhosted.org/packages/9f/e5/53968b76012cc67fe1db72b89327bea5113669d69098085c067c5fefbfd2/PySearcher-1.7.2.post2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f77194de2518a3e69bc2df8407b50c6", "sha256": "bd2a695877602243ef5d464ad0f86ec9ebf4e7612f1f7243dc8ccce0923603fe" }, "downloads": -1, "filename": "PySearcher-1.7.2.post2.tar.gz", "has_sig": false, "md5_digest": "9f77194de2518a3e69bc2df8407b50c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18837, "upload_time": "2019-03-10T04:42:25", "url": "https://files.pythonhosted.org/packages/4d/32/912bd61e86c033215b460424cd883f2702b5a5471f363a006564d5791699/PySearcher-1.7.2.post2.tar.gz" } ] }