We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1928c17 commit 7e24a91Copy full SHA for 7e24a91
1 file changed
src/emc/ini/update_ini.py
@@ -81,6 +81,18 @@ def find_section(section, inistring):
81
# We want to work with the base INI file here, not the expanded version if #include is used
82
filename = re.sub(r'\.expanded', '', filename)
83
84
+# Search for included files
85
+base_dir = os.path.dirname(filename)
86
+included_files = []
87
+# included_files.append(filename)
88
+pattern = re.compile(r"^#INCLUDE[ \t]+(\S+)")
89
+with open(filename, "r", encoding="utf-8") as f:
90
+ for line in f:
91
+ match = pattern.match(line.strip())
92
+ if match:
93
+ file = os.path.join(base_dir, match.group(1))
94
+ included_files.append(file)
95
+
96
try:
97
ini = linuxcnc.ini(filename)
98
except:
0 commit comments