-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake_operations.py
More file actions
31 lines (31 loc) · 953 Bytes
/
make_operations.py
File metadata and controls
31 lines (31 loc) · 953 Bytes
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
26
27
28
29
30
31
import os
from os.path import dirname, basename, isfile, join
def make_operations():
modules = os.listdir('./Operations Folder')
test = open('Operations.py','w+')
functions = []
for module in modules:
if module[-3:] != '.py':
continue
if module == '__init__.py':
continue
f = open('./Operations Folder/' + module,'r')
test.write(f.read())
test.write('\n')
functions.append(module[:-3])
return(functions)
def make_otherfunctions():
modules = os.listdir('./PeripheryFunctions')
test = open('Periphery.py','w+')
functions = []
for module in modules:
if module[-3:] != '.py':
continue
if module == '__init__.py':
continue
f = open('./PeripheryFunctions/' + module,'r')
test.write(f.read())
test.write('\n')
functions.append(module[:-3])
return(functions)
make_operations()