55import numpy as np
66import openpyxl
77from math import floor , log2 , log10
8+ import shutil
9+ import os
810
911def dataImporter (name ):
1012
@@ -100,9 +102,9 @@ def BitEnumSelector(bits):
100102
101103 return enum
102104
103- def saveConfigFile (channels , bits , sampleRate ,captureLength , maxAmplitude , segments ):
105+ def saveConfigFile (channels , bits , sampleRate ,captureLength , segments ):
104106
105- configValues = [channels , bits , sampleRate , captureLength , maxAmplitude , segments ]
107+ configValues = [channels , bits , sampleRate , captureLength , segments ]
106108
107109 # Save the list to a text file
108110 with open ('configValues.txt' , 'w' ) as file :
@@ -129,7 +131,19 @@ def loadConfigValues():
129131 bits = restored_configValues [1 ]
130132 sampleRate = restored_configValues [2 ]
131133 captureLength = restored_configValues [3 ]
132- maxAmplitude = restored_configValues [4 ]
133134 segments = restored_configValues [5 ]
134135
135- return channels , bits , sampleRate , captureLength , maxAmplitude , segments
136+ return channels , bits , sampleRate , captureLength , segments
137+
138+ def copyFile (source_directory , filename ):
139+
140+ destination_directory = 'D:/'
141+
142+ # Define the destination file path
143+ source_file = os .path .join (source_directory , filename )
144+ destination_file = os .path .join (destination_directory , filename )
145+
146+ # Copy the file to the new location
147+ shutil .copy (source_file , destination_file )
148+
149+ return
0 commit comments