Skip to content

Commit 0493420

Browse files
committed
V0.0 framework
1 parent 123f9c5 commit 0493420

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

init.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""
2+
SiEPIC Photonics Library
3+
4+
Author: Mustafa Hammood
5+
6+
7+
Module: Intialize the required packages
8+
"""
9+
10+
#%% library version
11+
version= 0.0
12+
13+
print("\n"+"Intializing SiEPIC Photonics Library v"+ str(version)+"\n")
14+
15+
#%% import required packages
16+
17+
import importlib
18+
19+
packages = ["numpy", "scipy", "matplotlib.pyplot", "pyparsing"]
20+
21+
for lib in packages:
22+
try:
23+
globals()[lib] = importlib.import_module(lib)
24+
except ImportError:
25+
import pip
26+
pip.main(['install', '--user', i])
27+
globals()[lib] = importlib.import_module(lib)
28+
29+
print("Imported packages: ", packages)

0 commit comments

Comments
 (0)