File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed
Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 1+ # -*- mode: python -*-
2+
3+ block_cipher = None
4+
5+
6+ a = Analysis (['DAFD_GUI.py' ],
7+ pathex = ['/Users/CIDARLAB/Desktop/DAFD' ],
8+ binaries = [],
9+ datas = [('MicroFluidics_Random.csv' ,'.' )],
10+ hiddenimports = [],
11+ hookspath = [],
12+ runtime_hooks = [],
13+ excludes = [],
14+ win_no_prefer_redirects = False ,
15+ win_private_assemblies = False ,
16+ cipher = block_cipher )
17+ pyz = PYZ (a .pure , a .zipped_data ,
18+ cipher = block_cipher )
19+ exe = EXE (pyz ,
20+ a .scripts ,
21+ exclude_binaries = True ,
22+ name = 'DAFD_GUI' ,
23+ debug = False ,
24+ strip = False ,
25+ upx = True ,
26+ console = True )
27+ coll = COLLECT (exe ,
28+ a .binaries ,
29+ a .zipfiles ,
30+ a .datas ,
31+ strip = False ,
32+ upx = True ,
33+ name = 'DAFD_GUI' )
Original file line number Diff line number Diff line change 66from scipy .optimize import minimize
77import numpy
88import csv
9+ import sys
10+ import os
11+
12+ def resource_path (relative_path ):
13+ """ Get absolute path to resource, works for dev and for PyInstaller """
14+ try :
15+ # PyInstaller creates a temp folder and stores path in _MEIPASS
16+ base_path = sys ._MEIPASS
17+ except Exception :
18+ base_path = os .path .abspath ("." )
19+
20+ return os .path .join (base_path , relative_path )
921
1022class InterModel :
1123 """The interpolation models plus wrapper functions to use them"""
@@ -19,7 +31,7 @@ def __init__(self):
1931 self .ranges_dict = {} #The min and max of each input type
2032 values_dict = {} #Temporary variable used for calculating ranges. Dict with input header as key and a list of all values of that header as values
2133
22- with open ('MicroFluidics_Random.csv' ) as f :
34+ with open (resource_path ( 'MicroFluidics_Random.csv' ) ) as f :
2335 #Make a list of lists of our csv data
2436 lines = csv .reader (f , delimiter = ',' )
2537
You can’t perform that action at this time.
0 commit comments