Skip to main content

fread

Python package to convert the interactive based console to file input based, with a single statement.


Version - 1.0
Github - https://github.com/saisrinivaspaila/fread-pypi

Why to use?

There are people like me, who use python for competitive programming or for building console based applications. When I use my local editors, I need to enter the code from the console everytime. There are ways I can change it to file input based, for which I need to refactor a lot of code during submissions. So this package helps us to take inputs directly from files with the same code that we write for interactive console. With one line command, we can change the code from interactive console to file based input.

I hope you people will find it is useful.

How to use?

installing
pip install fread
how to use in code
from fread import get_input
get_input.fileInput(mainPythonFile, yourInputTextFile)
Example

main.py:

from fread import get_input
get_input.fileInput("main.py","input.txt")
n1 = int(input())
n2 = int(input())
print("sum:",n1+n2)
str1 = input()
print("string:",str1)
list1 = map(int,input().split())
print("list:",list1)

input.txt:

1
2
python is love, Happy Coding
1 2 3 4

output:

sum: 3
string: python is love, Happy coding
list: [1,2,3,4]

Release files for fread 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fread 1.0
File Size Uploaded
fread-1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fread 1.0
File Interpreter ABI Platform
fread-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / fread-1.0.tar.gz

Download URL fread-1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4b8492cf0fc664e0c90d4d30e7bd500ebfec0dea1b611a9d157c5c82f25ee7f3
BLAKE2b-256 checksum
How to use checksums
b866290329f3481bf75e35241359011399ea62548f92aff4d22f2f23d4b7b8c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / fread-1.0-py3-none-any.whl

Download URL fread-1.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59670cca539fb50917a996335f33e579e820af2acb84b2d0ae5543d22b9b4a87
BLAKE2b-256 checksum
How to use checksums
f0a706fdc7a01ba9fb6cc366a89952c1f3197787d7f22cd9b157224eaf5bbd59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page