Skip to content

__main__.go() -> Adding command-line parsers with getopt  #3

@c4llmeco4ch

Description

@c4llmeco4ch

If you want something else to do until Friday given my notes on #2 , start looking at different ways we can pull command line arguments. I've listed a few different ones we can work with if one speaks to you, or we can discuss it on Friday. All of these are fine.

  • Click : A CLI tool that helps to automate a lot of the processes such as automatic help pages. We'll need to (very, cuz this is a very deep topic) briefly discuss decorators.
  • The getopt module : I've actually already set up some of our code for this with the globals in main on lines 10 and 11. Pretty basic but that's fine.
  • The argparser module : Another base python module like getopt that creates a parser object to do the object reading rather than using if-else blocks.

Feel free to read over these and see if one seems easier to grasp than the others. No rush on any of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions