commited all contents created by participants
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
|
||||
def obtenir ( option, fallback=False ) :
|
||||
'''String -> String/Boolean
|
||||
Si l'option demandée n'existe pas, renvoie False.
|
||||
Si l'option demandée existe'''
|
||||
if option in sys.argv:
|
||||
index = sys.argv.index( option ) + 1
|
||||
if len( sys.argv ) > index :
|
||||
print type( sys.argv[ index - 1 ])
|
||||
print type( sys.argv[ index ])
|
||||
print sys.argv[ index ][0]
|
||||
return sys.argv[ index ]
|
||||
return fallback
|
||||
Reference in New Issue
Block a user