20 lines
562 B
Python
20 lines
562 B
Python
|
# Base example looks like this. Put below code in empty 'cog' line, replace print() with cog.out()
|
||
|
# < !-- [[[cog
|
||
|
#
|
||
|
# ]]] -->
|
||
|
# <!-- [[[end]]] -->
|
||
|
|
||
|
import os
|
||
|
examples_dir = "examples"
|
||
|
config_ini_example = "config.ini.example"
|
||
|
config_ini_example_abs = os.path.join(examples_dir, config_ini_example)
|
||
|
try:
|
||
|
with open(config_ini_example_abs) as config_ini_example_handle:
|
||
|
config_ini_example_content = config_ini_example_handle.read()
|
||
|
except OSError:
|
||
|
pass
|
||
|
else:
|
||
|
print(f"```\n"
|
||
|
f"{config_ini_example_content.rstrip()}\n"
|
||
|
f"```")
|