Revision 6491eeeb cfg/humotion.cfg
cfg/humotion.cfg | ||
---|---|---|
6 | 6 |
def fetch_default(param_name): |
7 | 7 |
for line in open("../src/server/config.cpp"): |
8 | 8 |
if param_name in line: |
9 |
result = re.findall("=\s*([\d.]+)", line) |
|
9 |
result = re.findall("=\s*([\d.]+);", line)
|
|
10 | 10 |
print result |
11 | 11 |
if result: |
12 | 12 |
return float(result[0]) |
Also available in: Unified diff