>>marcob@pc-beruntu:~/work/python$ python arg.py -v >>usage: arg.py [-h] [-v] PATH >>arg.py: error: too few arguments >> >> >>marcob@pc-beruntu:~/work/python$ python arg.py >>usage: arg.py [-h] [-v] PATH >>arg.py: error: too few arguments > > > > >A me pare che non funzioni anche senza argomenti... >Se stampi l'help vedi che l'argomento PATH, in quanto posizionale, è >obbligatorio: > > >marcob@pc-beruntu:~/work/python$ python arg.py -h >>usage: arg.py [-h] [-v] PATH >> >> >>positional arguments: >> PATH >> >> >>optional arguments: >> -h, --help show this help message and exit >> -v versione > > >Ciao. >Marco. >
Quello che vorrei fare è il seguente comando -v --> mi stampa la versione comando path --> esegue In tutti gli altri casi visualizza l'help. E' poì che cerco nella documentazione ma non riesco a venirne a capo. Walter _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python