This is myh first module on python.
Project description
Speed File Library
What is this?
The module allows you to work with files in just one line of code, without the need to manually open and close the file each time
Quick Guide
The module is based on the following structure:
f = open('data.txt')
data = f.readlines()
f.close()
Which Python provides by standard.
Using
Using the library is as simple and convenient as possible:
Let's import it first:
First, import everything from the library (use the from
... import *
construct).
Examples of all operations:
Writing the contents of an entire file to a variable using the read()
function:
temp = File(path='test.txt').read()
Writing the contents of an entire file to a variable line by line using the readlines()
function:
temp = File(path='test.txt').readlines()
Write only the first line from a file using the readline()
function:
temp = File(path='test.txt').readline()
Writing data from a variable to a file using write() (overwriting or creating a file):
temp = "Test data"
File(path='test.txt', data=temp).write()
Adding data from a variable to a file using write() (or creating a file):
temp = "Test data"
File(path='test.txt', data=temp).add()
Developer
My site: link
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file firstlib-0.1.tar.gz
.
File metadata
- Download URL: firstlib-0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575dc9b787a149bccc7d7029d0df9e181d86c346e2c95d10311f554839b60217 |
|
MD5 | f3c69fbe0021ab3634faca8bf074c267 |
|
BLAKE2b-256 | d46ba6be61d4b2cb79460e107d14facbe89a41732f001b38d82c7d6a6a67689c |
File details
Details for the file firstlib-0.1-py3-none-any.whl
.
File metadata
- Download URL: firstlib-0.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1568d258a8e6667b5f381c22787c1eb5e7c5be7fff2b330f7fd526d1e33e67f8 |
|
MD5 | 18ef00ea13a75e13a16aabbdbff3b020 |
|
BLAKE2b-256 | 33cb780fcbe29213055cddb4fb111faf2e1cc729b4327ba5cbbdd89f2cff004b |