itkdb-gtk 0.0.3__py3-none-any.whl → 0.20.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. itkdb_gtk/{sendShipments.py → CreateShipments.py} +74 -78
  2. itkdb_gtk/{getShipments.py → GetShipments.py} +99 -106
  3. itkdb_gtk/GlueWeight.py +45 -66
  4. itkdb_gtk/ITkDB.desktop +8 -0
  5. itkdb_gtk/ITkDB.svg +380 -0
  6. itkdb_gtk/ITkDBlogin.py +10 -6
  7. itkdb_gtk/ITkDButils.py +295 -57
  8. itkdb_gtk/PanelVisualInspection.py +590 -0
  9. itkdb_gtk/QRScanner.py +120 -0
  10. itkdb_gtk/SensorUtils.py +492 -0
  11. itkdb_gtk/ShowAttachments.py +267 -0
  12. itkdb_gtk/ShowComments.py +94 -0
  13. itkdb_gtk/ShowDefects.py +103 -0
  14. itkdb_gtk/UploadModuleIV.py +566 -0
  15. itkdb_gtk/UploadMultipleTests.py +746 -0
  16. itkdb_gtk/UploadTest.py +509 -0
  17. itkdb_gtk/VisualInspection.py +297 -0
  18. itkdb_gtk/WireBondGui.py +1304 -0
  19. itkdb_gtk/__init__.py +38 -12
  20. itkdb_gtk/dashBoard.py +292 -33
  21. itkdb_gtk/dbGtkUtils.py +356 -75
  22. itkdb_gtk/findComponent.py +242 -0
  23. itkdb_gtk/findVTRx.py +36 -0
  24. itkdb_gtk/readGoogleSheet.py +1 -2
  25. itkdb_gtk/untrash_component.py +35 -0
  26. {itkdb_gtk-0.0.3.dist-info → itkdb_gtk-0.20.1.dist-info}/METADATA +21 -12
  27. itkdb_gtk-0.20.1.dist-info/RECORD +30 -0
  28. {itkdb_gtk-0.0.3.dist-info → itkdb_gtk-0.20.1.dist-info}/WHEEL +1 -1
  29. itkdb_gtk-0.20.1.dist-info/entry_points.txt +12 -0
  30. itkdb_gtk/checkComponent.py +0 -131
  31. itkdb_gtk/groundingTest.py +0 -225
  32. itkdb_gtk/readAVSdata.py +0 -565
  33. itkdb_gtk/uploadPetalInformation.py +0 -604
  34. itkdb_gtk/uploadTest.py +0 -384
  35. itkdb_gtk-0.0.3.dist-info/RECORD +0 -19
  36. itkdb_gtk-0.0.3.dist-info/entry_points.txt +0 -7
  37. {itkdb_gtk-0.0.3.dist-info → itkdb_gtk-0.20.1.dist-info}/top_level.txt +0 -0
@@ -1,604 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Uploads data from AVS pdf."""
3
- import json
4
- import sys
5
- from argparse import ArgumentParser
6
- from datetime import datetime
7
- from pathlib import Path
8
-
9
- import dateutil.parser
10
- import gi
11
-
12
- gi.require_version("Gtk", "3.0")
13
- from gi.repository import Gtk, Gio
14
-
15
- try:
16
- import readAVSdata
17
- import ITkDBlogin
18
- import ITkDButils
19
-
20
- from dbGtkUtils import replace_in_container, complain, DictDialog, ask_for_confirmation
21
-
22
- except ModuleNotFoundError:
23
- from itkdb_gtk import readAVSdata, ITkDBlogin, ITkDButils
24
- from itkdb_gtk.dbGtkUtils import replace_in_container, complain, DictDialog, ask_for_confirmation
25
-
26
-
27
- def create_scrolled_dictdialog(the_dict, hidden=("component", "testType")):
28
- """Create a DictDialog within a scrolled window.
29
-
30
- Return:
31
- ------
32
- scrolled: the scrolled window
33
- gM: the DictDialog
34
-
35
- """
36
- gM = DictDialog(the_dict, hidden)
37
- scrolled = Gtk.ScrolledWindow()
38
- scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
39
- scrolled.add(gM)
40
- return scrolled, gM
41
-
42
-
43
- class AVSPanel(Gtk.Window):
44
- """Dialog for interaction with DB."""
45
-
46
- def __init__(self, session, options):
47
- """Initialization."""
48
- super().__init__(title="Upload AVS Data")
49
- self.db_session = session
50
- self.test_uploaded = {}
51
- self.test_list = []
52
- self.test_index = {}
53
- self.test_panel = {}
54
- self.test_map = {}
55
- self.petal_core = None
56
- self.petal_weight = -1
57
- # self.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
58
-
59
- #
60
- # Prepare HeaderBar
61
- hb = Gtk.HeaderBar()
62
- hb.set_show_close_button(True)
63
- hb.props.title = "DB Upload Petal Data"
64
- self.set_titlebar(hb)
65
-
66
- button = Gtk.Button()
67
- icon = Gio.ThemedIcon(name="document-send-symbolic")
68
- image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
69
- button.add(image)
70
- button.set_tooltip_text("Click to upload test shown in notebook.")
71
- button.connect("clicked", self.upload_current_test)
72
- hb.pack_end(button)
73
-
74
- button = Gtk.Button()
75
- icon = Gio.ThemedIcon(name="emblem-documents-symbolic")
76
- image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
77
- button.add(image)
78
- button.set_tooltip_text("Click to upload AVS files.")
79
- button.connect("clicked", self.upload_avs_files)
80
- hb.pack_end(button)
81
-
82
- button = Gtk.Button()
83
- icon = Gio.ThemedIcon(name="system-search-symbolic")
84
- image = Gtk.Image.new_from_gicon(icon, Gtk.IconSize.BUTTON)
85
- button.add(image)
86
- button.set_tooltip_text("Click to search SN in data base.")
87
- button.connect("clicked", self.query_db)
88
- hb.pack_end(button)
89
-
90
- self.userLabel = Gtk.Label()
91
- self.userLabel.set_text(session.user.name)
92
- hb.pack_start(self.userLabel)
93
-
94
- #
95
- # Crete man contentt box
96
- self.mainBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
97
- self.add(self.mainBox)
98
-
99
- # PS file entry and search button
100
- self.btnPSF = Gtk.FileChooserButton()
101
- self.btnPSF.connect("file-set", self.on_psf_set)
102
- if options.PS:
103
- ifile = Path(options.PS).expanduser().resolve().as_posix()
104
- self.btnPSF.set_filename(ifile)
105
- self.on_psf_set()
106
-
107
- # FAT file entry and seach buttin
108
- self.btnFAT = Gtk.FileChooserButton()
109
- self.btnFAT.connect("file-set", self.on_fat_set)
110
- if options.FAT:
111
- ifile = Path(options.FAT).expanduser().resolve().as_posix()
112
- self.btnFAT.set_filename(ifile)
113
-
114
- # The Serial number
115
- self.SN = Gtk.Entry()
116
- # self.SN.connect("changed", self.SN_changed)
117
- if options.SN:
118
- self.SN.set_text(options.SN)
119
-
120
- # Put the 3 objects in a Grid
121
- grid = Gtk.Grid(column_spacing=5, row_spacing=1)
122
- self.mainBox.pack_start(grid, False, True, 0)
123
-
124
- grid.attach(Gtk.Label(label="Serial No."), 0, 0, 1, 1)
125
- grid.attach(self.SN, 1, 0, 1, 1)
126
-
127
- grid.attach(Gtk.Label(label="Prod. Sheet"), 0, 1, 1, 1)
128
- grid.attach(self.btnPSF, 1, 1, 1, 1)
129
-
130
- grid.attach(Gtk.Label(label="FAT file"), 0, 2, 1, 1)
131
- grid.attach(self.btnFAT, 1, 2, 1, 1)
132
-
133
- # Add a Separator
134
- self.mainBox.pack_start(Gtk.Separator(orientation=Gtk.Orientation.VERTICAL), False, True, 0)
135
-
136
- # The notebook
137
- self.notebook = Gtk.Notebook()
138
- self.notebook.set_tab_pos(Gtk.PositionType.LEFT)
139
- self.mainBox.pack_start(self.notebook, True, True, 20)
140
-
141
- # Create the Notebook pages
142
- defaults = {
143
- "institution": "AVS",
144
- "runNumber": 1,
145
- }
146
-
147
- self.manufacture = self.create_test_window(
148
- ITkDButils.get_test_skeleton(
149
- self.db_session, "CORE_PETAL", "MANUFACTURING", defaults),
150
- "manufacture", "Manufacture")
151
-
152
- self.weights = self.create_test_window(
153
- ITkDButils.get_test_skeleton(
154
- self.db_session, "CORE_PETAL", "WEIGHING", defaults),
155
- "weights", "Weights")
156
-
157
- self.delamination = self.create_test_window(
158
- ITkDButils.get_test_skeleton(
159
- self.db_session, "CORE_PETAL", "DELAMINATION", defaults),
160
- "delamination", "Delamination")
161
-
162
- self.grounding = self.create_test_window(
163
- ITkDButils.get_test_skeleton(
164
- self.db_session, "CORE_PETAL", "GROUNDING_CHECK", defaults),
165
- "grounding", "Grounding")
166
-
167
- self.metrology = self.create_test_window(
168
- ITkDButils.get_test_skeleton(
169
- self.db_session, "CORE_PETAL", "METROLOGY_AVS", defaults),
170
- "metrology", "Metrology")
171
-
172
- self.visual_inspection = self.create_test_window(
173
- ITkDButils.get_test_skeleton(
174
- self.db_session, "CORE_PETAL", "VISUAL_INSPECTION", defaults),
175
- "visual_inspection", "Visual Inspection")
176
-
177
- # List componentes
178
- self.components = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
179
- self.components.set_border_width(5)
180
- self.notebook.append_page(self.components, Gtk.Label(label="Components"))
181
-
182
- # The button box
183
- btnBox = Gtk.ButtonBox(orientation=Gtk.Orientation.HORIZONTAL)
184
-
185
- btn = Gtk.Button(label="Reload AVS files")
186
- btn.connect("clicked", self.read_avs_files)
187
- btnBox.add(btn)
188
-
189
- btn = Gtk.Button(label="Query DB")
190
- btn.connect("clicked", self.query_db)
191
- btnBox.add(btn)
192
-
193
- btn = Gtk.Button(label="Assemble")
194
- btn.connect("clicked", self.on_assembly)
195
- btnBox.add(btn)
196
-
197
- btn = Gtk.Button(label="Upload Tests")
198
- btn.connect("clicked", self.on_upload)
199
- btnBox.add(btn)
200
-
201
- btn = Gtk.Button(label="Quit")
202
- btn.connect("clicked", Gtk.main_quit)
203
- btnBox.add(btn)
204
-
205
- self.mainBox.pack_start(btnBox, False, True, 0)
206
- self.connect("destroy", Gtk.main_quit)
207
-
208
- def create_test_window(self, test_json, test_name, label):
209
- """Create the dialog for a DB test and add it to the notebook.
210
-
211
- Args:
212
- ----
213
- test_json: The JSon-like dict with the values
214
- test_name: The name of the test for internal indexing
215
- label: The label for the Notebook
216
-
217
- Return:
218
- ------
219
- The box containing the data.
220
-
221
- """
222
- scrolled, gM = create_scrolled_dictdialog(test_json)
223
- self.test_list.append(gM)
224
- self.test_index[test_name] = len(self.test_list) - 1
225
- self.test_map[test_json["testType"]] = test_name
226
-
227
- box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
228
- box.set_border_width(5)
229
- box.pack_end(scrolled, True, True, 0)
230
- box.dict_dialog = gM
231
- gM.box = box
232
- self.test_panel[test_name] = box
233
- self.notebook.append_page(box, Gtk.Label(label=label))
234
-
235
- return box
236
-
237
- def update_scroll_window(self, key, data):
238
- """Update panel for a given test."""
239
- scrolled, gM = create_scrolled_dictdialog(data, ("component", "testType"))
240
- self.test_list[self.test_index[key]] = gM
241
- replace_in_container(self.test_panel[key], scrolled)
242
-
243
- def check_register_petal(self, SN):
244
- """Register teal core in DB.
245
-
246
- Args:
247
- ----
248
- SN: The petal Serial Number.
249
-
250
- """
251
- if self.petal_core:
252
- return
253
-
254
- self.find_petal(SN, silent=True)
255
- if self.petal_core:
256
- return
257
-
258
- dialog = Gtk.MessageDialog(
259
- transient_for=self,
260
- flags=0,
261
- message_type=Gtk.MessageType.INFO,
262
- text="Register Petal Core\n{}".format(SN)
263
- )
264
- dialog.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
265
- Gtk.STOCK_OK, Gtk.ResponseType.OK)
266
- dialog.set_border_width(10)
267
- dialog.format_secondary_text("Enter Petal Core Alias")
268
- alias = Gtk.Entry()
269
- box = dialog.get_content_area()
270
- box.add(alias)
271
- dialog.show_all()
272
- out = dialog.run()
273
- if out == Gtk.ResponseType.OK:
274
- petal_alias = alias.get_text()
275
- rc = ITkDButils.registerPetalCore(self.db_session, SN, petal_alias)
276
- if rc is None:
277
- complain("Could not Register petal {} ({})".format(SN, petal_alias))
278
-
279
- dialog.hide()
280
- dialog.destroy()
281
-
282
- def get_app_petal_serial_number(self):
283
- """Get the SN from the text box."""
284
- txt_SN = self.SN.get_text().strip()
285
- return txt_SN
286
-
287
- def check_petal_serial_number(self, SN):
288
- """Check tha the given SN is consistent."""
289
- txt_SN = self.get_app_petal_serial_number()
290
- if txt_SN and len(txt_SN):
291
- if txt_SN != SN.strip():
292
- return False
293
-
294
- else:
295
- return True
296
-
297
- else:
298
- self.check_register_petal(SN)
299
- self.SN.set_text(SN)
300
- return True
301
-
302
- def on_psf_set(self, *args):
303
- """Production Sheet file selected."""
304
- PSF = self.btnPSF.get_filename()
305
- if PSF is None or not Path(PSF).exists():
306
- complain("Could not find Production File", PSF, parent=self)
307
- return
308
-
309
- try:
310
- manuf_json, weights_json, self.DESY_comp = readAVSdata.readProductionSheet(self.db_session, PSF, "SNnnnn")
311
- if self.petal_weight > 0:
312
- weights_json["results"]["WEIGHT_CORE"] = self.petal_weight
313
-
314
- except readAVSdata.AVSDataException as E:
315
- complain("Wrong Production Sheet file", str(E))
316
- self.btnPSF.unselect_all()
317
- return
318
-
319
- SN = manuf_json["component"]
320
- if not self.check_petal_serial_number(SN):
321
- complain("Inconsistent Serial number found.",
322
- "Wrong Serial number extracted from the Production Sheet document.\n{}".format(PSF))
323
- self.btnPSF.unselect_all()
324
- return
325
-
326
- scrolled, gM = create_scrolled_dictdialog(manuf_json, ("component", "testType"))
327
- self.test_list[self.test_index["manufacture"]] = gM
328
- replace_in_container(self.manufacture, scrolled)
329
-
330
- scrolled, gM = create_scrolled_dictdialog(weights_json, ("component", "testType"))
331
- self.test_list[self.test_index["weights"]] = gM
332
- replace_in_container(self.weights, scrolled)
333
-
334
- gD = DictDialog(self.DESY_comp)
335
- replace_in_container(self.components, gD)
336
-
337
- # Check if we need to assemble the module
338
- self.check_assembly(self.DESY_comp)
339
-
340
- def on_fat_set(self, *args):
341
- """FAT file selected."""
342
- FAT = self.btnFAT.get_filename()
343
- if FAT is None or not Path(FAT).exists():
344
- complain("Could not find FAT File", FAT, parent=self)
345
-
346
- try:
347
- SN = self.get_app_petal_serial_number()
348
- if SN and not SN.startswith("20USEBC"):
349
- SN = None
350
-
351
- j_vi, j_del, j_gnd, j_mtr, batch, self.petal_weight = readAVSdata.readFATfile(self.db_session, FAT, SN)
352
- self.test_list[self.test_index["weights"]].set_value("results.WEIGHT_CORE", self.petal_weight)
353
-
354
- except readAVSdata.AVSDataException as E:
355
- complain("Wrong FAT file", str(E))
356
- self.btnFAT.unselect_all()
357
- return
358
-
359
- SN = j_vi["component"]
360
- if not self.check_petal_serial_number(SN):
361
- complain("Inconsistent Serial number found.",
362
- "Wrong Serial number extracted from the FAT document.\n{}".format(FAT))
363
- self.btnFAT.unselect_all()
364
- return
365
-
366
- self.update_scroll_window("visual_inspection", j_vi)
367
- self.update_scroll_window("delamination", j_del)
368
- self.update_scroll_window("grounding", j_gnd)
369
- self.update_scroll_window("metrology", j_mtr)
370
-
371
- def read_avs_files(self, widgets):
372
- """Read AVS files."""
373
- PSF = self.btnPSF.get_filename()
374
- if PSF is not None:
375
- self.on_psf_set(None)
376
-
377
- FAT = self.btnFAT.get_filename()
378
- if FAT is not None:
379
- self.on_fat_set(None)
380
-
381
- return
382
-
383
- def find_petal(self, SN, silent=False):
384
- """Finds petal with given SN."""
385
- try:
386
- self.petal_core = ITkDButils.get_DB_component(self.db_session, SN)
387
-
388
- except Exception as E:
389
- if not silent:
390
- complain("Could not find Petal Core in DB", str(E))
391
-
392
- self.petal_core = None
393
- return
394
-
395
- try:
396
- if self.petal_core["type"]["code"] != "CORE_AVS":
397
- complain("Wrong component type", "This is not an AVS petal core")
398
-
399
- if self.petal_core["currentStage"]["code"] != "ASSEMBLY":
400
- complain("Wrong component stage", "Wrong stage: {}".format(self.petal_core["currentStage"]["code"]))
401
-
402
- print(json.dumps(self.petal_core, indent=3))
403
-
404
- except KeyError:
405
- # Petal is not there
406
- self.petal_core = None
407
-
408
- def query_db(self, widget=None, silent=False):
409
- """Called when QueryDB button clicked."""
410
- SN = self.SN.get_text()
411
- if len(SN) == 0:
412
- complain("Empty Serial number",
413
- "You should enter a valid Serial number for the petal core.",
414
- parent=self)
415
- self.petal_core = None
416
- return
417
-
418
- # if not checkSerialNumber(SN):
419
- # complain("Wrong Serial number",
420
- # "You should enter a valid Serial number for the petal core.",
421
- # parent=self)
422
- # return
423
- self.find_petal(SN, silent=silent)
424
-
425
- if self.btnFAT.get_filename() is None and self.btnPSF.get_filename() is None:
426
- # update tests from DB
427
- for test in self.petal_core["tests"]:
428
- latest = None
429
- latest_time = datetime.datetime(year=1, month=1, day=1, tzinfo=datetime.timezone.utc)
430
- testType = test["code"]
431
- for T in test["testRuns"]:
432
- test_date = dateutil.parser.parse(T["cts"])
433
- if test_date > latest_time:
434
- latest_time = test_date
435
- latest = T["id"]
436
-
437
- dbT = ITkDButils.get_testrun(self.db_session, latest)
438
- testDB = ITkDButils.from_full_test_to_test_data(dbT)
439
- self.update_scroll_window(self.test_map[testType], testDB)
440
-
441
- def check_assembly(self, components):
442
- """Check if we need to assemble components to core."""
443
- if self.petal_core is None:
444
- self.query_db()
445
- if self.petal_core is None:
446
- return
447
-
448
- comp_map = {
449
- "BT_PETAL_FRONT": "FacingFront",
450
- "BT_PETAL_BACK": "FacingBack",
451
- "COOLING_LOOP_PETAL": "CoolingLoop",
452
- "THERMALFOAMSET_PETAL": "AllcompSet"
453
- }
454
- missing = []
455
- for child in self.petal_core["children"]:
456
- if child["component"] is None:
457
- if child["type"] is not None:
458
- ctype = child["type"]["code"]
459
- else:
460
- ctype = child["componentType"]["code"]
461
-
462
- missing.append(ctype)
463
-
464
- if len(missing) == 0:
465
- return
466
-
467
- error_txt = []
468
- txt = "Click OK to add\n\t{}".format("\n\t".join(missing))
469
- if ask_for_confirmation("Missing components", txt, parent=self):
470
- this_petal = self.SN.get_text()
471
- for cmp in missing:
472
- SN = components[comp_map[cmp]]
473
- if SN[0:5] == "20USE":
474
- rc = ITkDButils.assemble_component(self.db_session, this_petal, SN)
475
- if rc is None:
476
- error_txt.append("Problem assembling {} into Petal\n".format(cmp))
477
-
478
- # Check for HonneyComb set
479
- for P in self.petal_core["properties"]:
480
- if P["code"] == "HC_ID" and P["value"] is None:
481
- rc = ITkDButils.set_component_property(self.db_session,
482
- this_petal,
483
- "HC_ID",
484
- components["HoneyCombSet"])
485
- if rc is None:
486
- error_txt.append("Problems setting HoneCombSet ID.\n")
487
-
488
- break
489
-
490
- if len(error_txt):
491
- complain("Assembly of {} could not be completeed:".format(this_petal),
492
- "\n".join(error_txt))
493
-
494
- def upload_current_test(self, *args):
495
- """Called with upload button clcked."""
496
- SN = self.SN.get_text()
497
- if len(SN) == 0:
498
- complain("Petal SN is empty")
499
- return
500
-
501
- def find_children(W):
502
- try:
503
- for c in W.get_children():
504
- if "DictDialog" in c.get_name():
505
- return c
506
-
507
- else:
508
- return find_children(c)
509
-
510
- except Exception:
511
- return None
512
-
513
- return None
514
-
515
- page = self.notebook.get_nth_page(self.notebook.get_current_page())
516
- dctD = find_children(page)
517
- if dctD is None:
518
- return
519
-
520
- values = dctD.values
521
- values["component"] = SN
522
- print(json.dumps(values, indent=2))
523
- rc = ITkDButils.upload_test(self.db_session, values)
524
- if rc is not None:
525
- complain("Could not upload test", rc)
526
-
527
- else:
528
- ask_for_confirmation("Test uploaded.",
529
- "{} - {}".format(values["component"], values["testType"]))
530
-
531
- def upload_avs_files(self, *args):
532
- """Called when upload AVS files clicked."""
533
- SN = self.SN.get_text()
534
- if len(SN) == 0:
535
- complain("Petal SN is empty")
536
- return
537
-
538
- def upload_file(file_path, title, desc):
539
- if file_path is not None:
540
- if not Path(file_path).exists():
541
- complain("Could not find {}".format(title))
542
-
543
- else:
544
- try:
545
- ITkDButils.create_component_attachment(self.db_session, SN, file_path, description=desc)
546
-
547
- except Exception as e:
548
- complain("Could not Upload {}".format(desc), str(e))
549
-
550
- PSF = self.btnPSF.get_filename()
551
- upload_file(PSF, "Production File", "AVS Production file")
552
-
553
- FAT = self.btnFAT.get_filename()
554
- upload_file(FAT, "FAT file", "AVS FAT file")
555
-
556
- def on_assembly(self, widget):
557
- """Assembly button clicked."""
558
- self.check_assembly(self.DESY_comp)
559
-
560
- def on_upload(self, widget):
561
- """Upload tests to DB."""
562
- if self.petal_core is None:
563
- self.query_db()
564
- if self.petal_core is None:
565
- return
566
-
567
- for test in self.test_list:
568
- values = test.values
569
- print(values["testType"])
570
- res = ITkDButils.upload_test(self.db_session, values)
571
- if res is not None:
572
- complain("Could not upload test {}".format(values["testType"]), res)
573
-
574
-
575
- if __name__ == "__main__":
576
- # Parse command line options
577
- parser = ArgumentParser()
578
- parser.add_argument('files', nargs='*', help="Input files")
579
- parser.add_argument("--SN", dest="SN", type=str, default=None,
580
- help="Module serial number")
581
- parser.add_argument("--PS", dest="PS", type=str, default=None,
582
- help="Produc tion Sheet file")
583
- parser.add_argument("--FAT", dest="FAT", type=str, default=None,
584
- help="FAT file")
585
-
586
- options = parser.parse_args()
587
-
588
- # ITk_PB authentication
589
- dlg = ITkDBlogin.ITkDBlogin()
590
- session = dlg.get_client()
591
-
592
- # Start the Application
593
- win = AVSPanel(session, options)
594
- win.show_all()
595
- win.set_accept_focus(True)
596
- win.present()
597
- try:
598
- Gtk.main()
599
- except KeyboardInterrupt:
600
- print("Arrggggg !!!")
601
-
602
- print("Bye !!")
603
- dlg.die()
604
- sys.exit()