Advertisement · 728 × 90
#
Hashtag
#argparse
Advertisement · 728 × 90
Three terminal windows: first shows the help for argparse CLIs, with headings, options and arguments in different colour. The next is ruff and ty, with similar but different colour scheme. And the last window is uv with the same colour scheme as ruff and ty.

Three terminal windows: first shows the help for argparse CLIs, with headings, options and arguments in different colour. The next is ruff and ty, with similar but different colour scheme. And the last window is uv with the same colour scheme as ruff and ty.

🎨 Old news: I added colour to argparse CLI help in last month's Python 3.14.

⭐ New news: I just added colour to ruff and ty's help so they can catch up (uv already had colour).

#Python #CLI #argparse #ruff #ty #uv #colour

13 2 0 0
Post image

Had an enjoyable afternoon building a custom #cli #parser to replace #argparse in our code.

It's easy to use. But it is a custom parser and works only for my use case, but for that case it does more than argparse can and is simpler to use.
day1
#comandline #python #100DaysOfCode

2 0 1 0
Preview
experiments/python/parse-dralithus-cmdline at develop · sumanthvepa/experiments Experiments is a repository of programming experiments that I written to explore various aspects of programming and technology - sumanthvepa/experiments

Finally have time this weekend to finish a new #commandline #parser for my internal deployment tool. #python #argparse is not up to the job for a complex tool with subcommands. and complex options.
github.com/sumanthvepa/... #devops

🚀 #python #commandline #testing #devops #100DaysOfCode

2 0 0 0
Terminal output from a python script showing colored output on a help command

usage: create_gh_issue_bug.py [-h] [-f {django,drf,flask,fastapi,all}] [--version]

run gh commands on groups of projects ordered by framework.

options:
  -h, -help         show this help message and exit
  -f, --framework {django,drf, flask, fastapi, all}
                    specify a web framework group to run commands on (default: None)
  --version         show program's version number and exit

Terminal output from a python script showing colored output on a help command usage: create_gh_issue_bug.py [-h] [-f {django,drf,flask,fastapi,all}] [--version] run gh commands on groups of projects ordered by framework. options: -h, -help show this help message and exit -f, --framework {django,drf, flask, fastapi, all} specify a web framework group to run commands on (default: None) --version show program's version number and exit

Migrated my user-space environement over to #Python 3.14.0b1 today.

Nice to see the majority of the packages I use work without issue, so far.

Plus, I get that all that pretty colored output from #argparse!

#EyeCandy #Terminal #CLI

0 0 0 0
Preview
Trabajar con parámetros (argumentos) por línea de comandos con Python » Proyecto A Cómo crear una ayuda "profesional" desde la línea de comandos y cómo obtener los argumentos (parámetros) pasados por línea de comandos a una aplicación/script Python. Mostramos el método usando la lib...

Trabajar con parámetros (argumentos) por línea de comandos con Python: proyectoa.com/trabajar-con...

#argumentos #parámetros #python #argparse #argv #argumentospython

0 0 0 0
Suggest the correct choice when invalid by hugovk · Pull Request #234 · hugovk/norwegianblue Before ❯ python3.14 -m norwegianblue python --color ye usage: python3.14 -m norwegianblue [-h] [-f {html,json,md,markdown,pretty,rst,csv,tsv,yaml}] [-c {yes,no,auto}] [--clear-cache] [--show-title ...

Hooray!

To start using this now and avoid a TypeError for 3.13 and earlier, instead of:

parser = argparse.ArgumentParser(suggest_on_error=True)

Do this:

parser = argparse.ArgumentParser()
parser.suggest_on_error = True

github.com/hugovk/norwe...

#Python #Python3.14 #Python314 #argparse

6 2 1 0