blob: e2cd826a63971342e340b0f6f0c08fa184d6d043 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
try:
import pyotherside
except:
print("no pyotherside module loaded")
def get_level_desc(path):
return {"name": os.path.basename(path),
"path": path,
}
def get_levels(qtPath, documents):
pyotherside.send('log', documents)
level_path = os.path.join(qtPath, "../content", "sgf")
provided_levels = [get_level_desc(os.path.join(level_path, f)) for f in os.listdir(level_path)]
return provided_levels
|