Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

cant find output file #14

Open
flamboo opened this issue Feb 23, 2019 · 1 comment
Open

cant find output file #14

flamboo opened this issue Feb 23, 2019 · 1 comment

Comments

@flamboo
Copy link

flamboo commented Feb 23, 2019

I cant seem to find the output file after using the tool on a folder of .yml files, any idea how I could find it at all ?

@SunbrightShinobi
Copy link

@flamboo its doesn't automatically create an output file, it creates a dict in memory. if you wanted a file, here is example code if all of your .yaml files were in ./configs

import yaml
from yamlreader import yaml_load
defaultConfig = {
        "loglevel" : "error",
        "some" : "value"
}

jinja_contexts = yaml_load("./configs", defaultConfig)
with open('jinja_contexts.txt', 'wt') as out:
    print(yaml.dump(jinja_contexts, default_flow_style=False), file=out)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants