Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pythonargparse [2017/05/25 15:12]
yassine chaouche created
pythonargparse [2017/05/25 15:40] (current)
yassine chaouche
Line 30: Line 30:
 </​code>​ </​code>​
  
 +
 +You need to use the "​dest"​ argument to add_argument if you would like to have a reserved keyword option like from, import etc.
 +
 +<​code>​
 +parser.add_argument("​--from",​dest="​_from"​)
 +</​code>​
 ---- ----
  
 contact : [[http://​twitter.com/​ychaouche|@ychaouche]] yacinechaouche at yahoocom contact : [[http://​twitter.com/​ychaouche|@ychaouche]] yacinechaouche at yahoocom

QR Code
QR Code optparse (generated for current page)