+def record(cmd, path_recordfile):
+ """Append cmd string plus newline to file at path_recordfile."""
+ # Doesn't yet replace old record() fully.
+ file = open(path_recordfile, "a")
+ file.write(cmd + "\n")
+ file.close()
+
+
+def obey_lines_in_file(path, name):
+ """Call obey() on each line of path's file, use name in input prefix."""
+ file = open(io_db["path_worldconf"], "r")
+ line_n = 1
+ for line in file.readlines():
+ obey(line.rstrip(), io_db, name + "file line " + str(line_n))
+ line_n = line_n + 1
+ file.close()
+