Fork me on GitHub
#off-topic
<
2022-01-18
>
Benjamin10:01:24

Let's say I want to communicate some data like a json with 2k - 200k characters to a program. Is there a reason to not do it with command line arguments and what are alternatives? I could think of for example writing to a file and making the file a command line arg.

p-himik10:01:31

Making your program being able to read stdin makes some operations easier. But there are no truly impossible things if you don't support stdin directly and only support files. And if you mean the whole JSON as a single CLI argument, then don't do it. Command line arguments have a limited length, which is platform-specific.

👍 2
Benjamin11:01:07

I realized reading from stdin is really easy. I'll go with that

👍 1
Benjamin13:01:10

do you guys know a python package thing where I can depend on a package with a git sha?

Jon Boone13:01:54

What package manager?

Benjamin13:01:27

doesn't matter.

Cora (she/her)14:01:57

poetry is really nice and supports git deps among other things https://python-poetry.org/docs/dependency-specification/

1
pavlosmelissinos06:01:42

I vouch for poetry! it's the only tool I've used that almost makes sense of the mess that is dependency management in Python. edit: I've tried pip (requirements.txt) and conda in the past, they're not even close. pipenv might be fine but poetry still seemed a better choice at the time (~3 years ago), not sure how they compare today.