mirror of
https://github.com/kennethreitz/clint.git
synced 2026-06-05 06:46:16 +00:00
added an example get_each_args.py
This commit is contained in:
@@ -0,0 +1 @@
|
||||
hi
|
||||
+2
-1
@@ -16,4 +16,5 @@ with indent(4, quote='>>>'):
|
||||
puts(colored.red('NOT Files detected: ') + str(args.not_files))
|
||||
puts(colored.red('Grouped Arguments: ') + str(dict(args.grouped)))
|
||||
|
||||
print
|
||||
print
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from clint import args
|
||||
from clint.textui import puts, colored
|
||||
|
||||
all_args = args.grouped
|
||||
|
||||
for item in all_args:
|
||||
if item is not '_':
|
||||
puts(colored.red("key:%s"%item))
|
||||
print(all_args[item].all)
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
echo "python get_each_args.py --name kracekumar --email me@kracekumar.com"
|
||||
python get_each_args.py --name kracekumar --email me@kracekumar.com
|
||||
echo "python get_each_args.py --languages python c html ruby --email me@kracekumar.com"
|
||||
python get_each_args.py --langauges python c html ruby --email me@kracekumar.com
|
||||
Reference in New Issue
Block a user