참고소스 수정본
This commit is contained in:
10
참고/guardrails-main/docs/pydocs/helpers.py
Normal file
10
참고/guardrails-main/docs/pydocs/helpers.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
|
||||
|
||||
def write_to_file(str, filename):
|
||||
# if the directory where the filename does not exist, create it
|
||||
if not os.path.exists(os.path.dirname(filename)):
|
||||
os.makedirs(os.path.dirname(filename))
|
||||
with open(filename, "w") as f:
|
||||
f.write(str)
|
||||
f.close()
|
||||
Reference in New Issue
Block a user