14 lines
368 B
Python
14 lines
368 B
Python
import os
|
|
from io import StringIO
|
|
|
|
|
|
def readfile(path: str) -> str:
|
|
srcio = StringIO()
|
|
with open(path + '.bu4') as file:
|
|
for line in file:
|
|
if line.startswith('@'):
|
|
srcio.write(readfile(os.path.join(path, '..', line.removeprefix('@').strip())))
|
|
else:
|
|
srcio.write(line)
|
|
return srcio.getvalue()
|