File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ Copy the user instruments to the user folder.
3
+ """
4
+
5
+ import glob
6
+ import os
7
+ import shutil
8
+
9
+ from src .app_data import AppData
10
+
11
+
12
+ def copy_to_user_folder ():
13
+ n_copied = 0
14
+ for source in glob .glob ("instrument_*.json" ):
15
+ destination = os .path .join (AppData .USER_FOLDER , source )
16
+ print (f"Copy: { source } to: { destination } " )
17
+ shutil .copy2 (source , destination )
18
+ n_copied += 1
19
+ print (f"\n { n_copied } instruments copied" )
20
+
21
+ n_copied = 0
22
+ for source in glob .glob ("configuration_*.json" ):
23
+ destination = os .path .join (AppData .USER_FOLDER , source )
24
+ print (f"Copy: { source } to: { destination } " )
25
+ shutil .copy2 (source , destination )
26
+ n_copied += 1
27
+ print (f"\n { n_copied } configurations copied" )
28
+
29
+
30
+ if __name__ == "__main__" :
31
+
32
+ import pylint
33
+
34
+ copy_to_user_folder ()
35
+ pylint .run_pylint ([__file__ ])
You can’t perform that action at this time.
0 commit comments