pyyaml - yaml property value -
I am using yaml file to store attribute and value. But some values need to be added to the current date.
Then how do I enter values in the yaml file, so that the yaml parser can automatically identify and replace with the current date
I am using pyaml and python
Pamal does not automatically replace anything eg just use a custom string eg After parsing $ {now}
and yaml file, replace it with the current date.
For example,
value.replace ("$ {now}", datetime.date.today (). Isoformat ())
where value
reads a sting from the input file
Comments
Post a Comment