Name | pydos2unix JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | Convert DOS (CRLF) files to Unix (LF) files and vice vera, written in Python. |
upload_time | 2023-03-23 18:51:25 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | |
keywords |
dos2unix
unix2dos
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pydos2unix
Convert DOS (CRLF) files to Unix (LF) files and vice vera, written in Python.
## Example Usage
```py
from pydos2unix import dos2unix, unix2dos
# Convert example.txt from CRLF to LF
with open("example1.txt", "rb") as src:
buffer = dos2unix(src)
with open("example1.txt", "wb") as dest:
dest.write(buffer)
# Convert a LF byte array to CRLF
with open("example2.txt", "wb") as dest:
buffer = unix2dos(b"Line 1\nLine 2\nLine 3\n")
dest.write(buffer)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "pydos2unix",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "dos2unix,unix2dos",
"author": "",
"author_email": "Dylan McDougall <dylanalexandermcdougall@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/6d/03/cb648806102529e9d0f8f01f42f90054a2f701c8f6f205038b786fe61adc/pydos2unix-0.0.1.tar.gz",
"platform": null,
"description": "# pydos2unix\n\nConvert DOS (CRLF) files to Unix (LF) files and vice vera, written in Python.\n\n## Example Usage\n\n```py\nfrom pydos2unix import dos2unix, unix2dos\n\n# Convert example.txt from CRLF to LF\nwith open(\"example1.txt\", \"rb\") as src:\n buffer = dos2unix(src)\nwith open(\"example1.txt\", \"wb\") as dest:\n dest.write(buffer)\n\n# Convert a LF byte array to CRLF\nwith open(\"example2.txt\", \"wb\") as dest:\n buffer = unix2dos(b\"Line 1\\nLine 2\\nLine 3\\n\")\n dest.write(buffer)\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Convert DOS (CRLF) files to Unix (LF) files and vice vera, written in Python.",
"version": "0.0.1",
"split_keywords": [
"dos2unix",
"unix2dos"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3c6f8c9e909754371b5baa15eba90de2771be84b7c1e3cb1e94bff8652e85b56",
"md5": "4e5210e25da8c08024212803ec71702d",
"sha256": "3006f7387128c7232574bf7d02e4233011010c8238f07dc3de0a727d3364de4d"
},
"downloads": -1,
"filename": "pydos2unix-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e5210e25da8c08024212803ec71702d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 2823,
"upload_time": "2023-03-23T18:51:22",
"upload_time_iso_8601": "2023-03-23T18:51:22.775506Z",
"url": "https://files.pythonhosted.org/packages/3c/6f/8c9e909754371b5baa15eba90de2771be84b7c1e3cb1e94bff8652e85b56/pydos2unix-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6d03cb648806102529e9d0f8f01f42f90054a2f701c8f6f205038b786fe61adc",
"md5": "398ff143e083e94b20f0c090a234959c",
"sha256": "282b14436d17a5fb27bea6298aa43a99829c09885253a19fcf9dab38ded36e28"
},
"downloads": -1,
"filename": "pydos2unix-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "398ff143e083e94b20f0c090a234959c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 233631,
"upload_time": "2023-03-23T18:51:25",
"upload_time_iso_8601": "2023-03-23T18:51:25.066614Z",
"url": "https://files.pythonhosted.org/packages/6d/03/cb648806102529e9d0f8f01f42f90054a2f701c8f6f205038b786fe61adc/pydos2unix-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-23 18:51:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pydos2unix"
}