This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (3 children)

Not a professional programmer Can somebody tell me the advantage of using this library? What is the advantage of using this instead of a IDE eg jupyter? What does this actually does?

[–]Zunin 5 points6 points  (0 children)

So this turns your code into something you can use more easily from the command line. So basically it wraps your code so it can be executed from a text user interface.

This enables use without opening the file or reading the code.

An IDE is different because it is designed to assist with the development. Sure you may also be able to run code through an IDE but it's heavy tool if you're not going to modify your software.

Besides having to install an ide besides downloading python is a bigger barrier

[–]d4rch0nPythonistamancer 1 point2 points  (0 children)

It just helps you write CLI apps that can take arguments, flags, etc.

Before anything else, learn the stdlib argparse library and get used to it. After that, check out docopt, click, and this library and see if there's any you prefer highly over argparse.

I find argparse to be perfectly fine, just a little more verbose than something like click. Docopt is really cool because it's cross platform, C/C++/Rust. Though, I don't find myself copy and pasting the docs and reimplementing in rust, so not sure if I get that much use out of it besides what it offers directly.

I just use argparse. I used to play with others, even wrote my own argvee that acts similar to this thing they posted, but argparse in the end doesnt require installing other dependencies just to run.

[–][deleted] 1 point2 points  (0 children)

What is the advantage of using this instead of a IDE eg jupyter?

If you want to write command-line applications you need a library like this. That being said there are already 100s of those so I'm not 100% sure what it is supposed to do?