I can write to a file using yaml.dump
but how do I write to a string?
Asked
Active
Viewed 120 times
0

MetallicPriest
- 29,191
- 52
- 200
- 356
-
Assuming it's doing something similar to the built-in `json` package, `.dumps`? If that doesn't work I'd use an in-memory "file": https://stackoverflow.com/q/44672524/3001761. – jonrsharpe Aug 05 '21 at 09:12
1 Answers
0
I have found the solution. Its an overloaded function. If you don't pass the file parameter, it will output to a string.

MetallicPriest
- 29,191
- 52
- 200
- 356