if file_name:
if not os.path.isabs(file_name):
file_name = os.path.join(universe.startdir, file_name)
+ os.makedirs(os.path.dirname(file_name), exist_ok=True)
file_descriptor = codecs.open(file_name, "a", "utf-8")
for line in lines:
file_descriptor.write(timestamp + " " + line + "\n")
if file_name:
if not os.path.isabs(file_name):
file_name = os.path.join(universe.startdir, file_name)
+ os.makedirs(os.path.dirname(file_name), exist_ok=True)
file_descriptor = codecs.open(file_name, "w", "utf-8")
file_descriptor.write(pid + "\n")
file_descriptor.flush()
os.remove(f.name)
for d in ("data", "var"):
shutil.rmtree(d, ignore_errors=True)
- os.mkdir("var")
# Start the service and wait for it to be ready for connections
service = subprocess.Popen(("mudpy", config),