randydev commited on
Commit
abdae8a
·
verified ·
1 Parent(s): 6ab4fc5

Create __init__.py

Browse files
Files changed (1) hide show
  1. stylish/__init__.py +21 -0
stylish/__init__.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ from os.path import dirname, isfile
3
+
4
+
5
+ def __list_all_modules():
6
+ work_dir = dirname(__file__)
7
+ mod_paths = glob.glob(work_dir + "/*/*.py")
8
+
9
+ all_modules = [
10
+ (((f.replace(work_dir, "")).replace("/", "."))[:-3])
11
+ for f in mod_paths
12
+ if isfile(f)
13
+ and f.endswith(".py")
14
+ and not f.endswith("__init__.py")
15
+ ]
16
+
17
+ return all_modules
18
+
19
+
20
+ ALL_MODULES = sorted(__list_all_modules())
21
+ __all__ = ALL_MODULES + ["ALL_MODULES"]