ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/MCP/Trunk/MCP_CopyUp_Request_UI.py
Revision: 266
Committed: Mon Feb 4 19:25:36 2013 UTC (13 years, 1 month ago) by nino.borges
Content type: text/x-python
Original Path: Python/NinoCode/Active_prgs/MCP/MCP_CopyUp_Request_UI.py
File size: 20951 byte(s)
Log Message:
moved the list of archive file types to the lib, so that there would be one place only to change it, and pointed copy up here.  Also added a warning dialog to copy up to warn when it's about to gather the compressed size of an archive.

File Contents

# User Rev Content
1 ninoborges 8 """
2    
3     MCP_CopyUp_Request_UI
4    
5     Created by
6     Emanuel Borges
7     10.25.2010
8    
9     This is the GUI to the MCP_CopyUp_Request program.
10    
11     """
12    
13 nino.borges 258 import wx, MCP_Lib, MCP_CopyUp_Request,os,WorkDirDialog
14 ninoborges 8 import wx.lib.filebrowsebutton as filebrowse
15    
16     class MyFrame(wx.Frame):
17     def __init__(self, parent, ID, title, pos=wx.DefaultPosition):
18 nino.borges 258 self.workDir = os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working")
19 nino.borges 203 wx.Frame.__init__(self, parent, ID, title, pos, size =(585,450))
20 ninoborges 8 self.panel = wx.Panel(self,-1)
21     #self.panel.SetBackgroundColour("yellow green")
22     casesListStaticText = wx.StaticText(self.panel, -1, "Select Case: ",wx.DefaultPosition)
23 nino.borges 189 #casesList,casesDir = MCP_Lib.GetCaseList()
24 nino.borges 232 print "connecting to matter tracking access db..."
25     self.accessDB = MCP_Lib.AccessDBConnection(r"\\chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
26     print "connected to DB."
27     self.myCases, self.officeCases, self.allCases, casesDir = MCP_Lib.GetCaseList('',self.accessDB)
28 nino.borges 189 self.casesListChoice = wx.Choice(self.panel, -1, wx.DefaultPosition, choices=self.myCases)
29 ninoborges 8 platformStaticText = wx.StaticText(self.panel, -1, "Select Platform:",wx.DefaultPosition)
30     platformChoices = ["Concordance DIS","Concordance LN","Relativity"]
31     self.platformListChoice = wx.Choice(self.panel, -1, wx.DefaultPosition, choices=platformChoices)
32 nino.borges 258
33 nino.borges 203 #workDirStaticText = wx.StaticText(self.panel, -1, "Select Work Dir:",wx.DefaultPosition)
34     #self.workDirControl = wx.TextCtrl(self.panel,-1,os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working"), size=(296,-1))
35     #workDirBrowseButton = wx.Button(self.panel, -1, "Browse", (10, 10))
36 ninoborges 8
37    
38     self.radio1 = wx.RadioButton(self.panel, -1, 'Individual File',style=wx.RB_GROUP)
39     self.fileBowserControl = wx.TextCtrl(self.panel, -1,size=(296,-1))
40     self.fileBowserButton = wx.Button(self.panel, -1, "Browse", (10, 10))
41    
42     self.requestAssistanceCheckBox = wx.CheckBox(self.panel,-1,": Request Data Analyst Assistance")
43     self.requestAssistanceCheckBox.Enable(False) ## Change me when you go live with this service.
44    
45     self.radio2 = wx.RadioButton(self.panel, -1, 'Entire folder of Files')
46     self.dirBowserControl = wx.TextCtrl(self.panel, -1, size=(296,-1))
47     self.dirBowserButton = wx.Button(self.panel, -1, "Browse", (10, 10))
48     self.dirBowserControl.Enable(False)
49     self.dirBowserButton.Enable(False)
50    
51 nino.borges 203 self.radio3 = wx.RadioButton(self.panel, -1, 'From Vendor Folder')
52     self.vendorBowserControl = wx.TextCtrl(self.panel, -1, size=(296,-1))
53     self.vendorBowserButton = wx.Button(self.panel, -1, "Browse", (10, 10))
54     self.vendorBowserControl.Enable(False)
55     self.vendorBowserButton.Enable(False)
56 ninoborges 8
57 nino.borges 203
58 ninoborges 8 self.CreateBoxesSection()
59     copyUpTypeStaticBox = wx.StaticBox(self.panel, -1, 'Copy Up:')
60     copyUpTypeStaticBoxSizer = wx.StaticBoxSizer(copyUpTypeStaticBox, wx.VERTICAL)
61    
62     radio1Sizer = wx.FlexGridSizer(1,3,10,10)
63     radio1Sizer.Add(self.radio1, 0, 0)
64     radio1Sizer.Add(self.fileBowserControl, 0)
65     radio1Sizer.Add(self.fileBowserButton, 0)
66     copyUpTypeStaticBoxSizer.Add(radio1Sizer, 0, wx.ALL|wx.ALIGN_LEFT,20)
67 nino.borges 203
68 ninoborges 8 radio2Sizer = wx.FlexGridSizer(1,3,10,10)
69     radio2Sizer.Add(self.radio2, 0)
70     radio2Sizer.Add(self.dirBowserControl, 0)
71     radio2Sizer.Add(self.dirBowserButton, 0)
72 nino.borges 203
73 ninoborges 8 copyUpTypeStaticBoxSizer.Add(radio2Sizer, 0, wx.ALL|wx.ALIGN_LEFT,20)
74 nino.borges 203 radio3Sizer = wx.FlexGridSizer(1,3,10,10)
75     radio3Sizer.Add(self.radio3, 0)
76     radio3Sizer.Add(self.vendorBowserControl, 0)
77     radio3Sizer.Add(self.vendorBowserButton, 0)
78     copyUpTypeStaticBoxSizer.Add(radio3Sizer, 0, wx.ALL|wx.ALIGN_LEFT,20)
79 ninoborges 8
80     casesSizer = wx.FlexGridSizer(2,2,15,5)
81     casesSizer.Add(casesListStaticText)
82     casesSizer.Add(self.casesListChoice)
83     casesSizer.Add(platformStaticText)
84     casesSizer.Add(self.platformListChoice)
85     #casesSizer = wx.BoxSizer(wx.HORIZONTAL)
86     #casesSizer.Add(casesListStaticText,0,wx.ALL,5)
87     #casesSizer.Add(self.casesListChoice,0,wx.ALL,5)
88     #casesSizer.Add(platformStaticText,0,wx.ALL,5)
89     #casesSizer.Add(self.platformListChoice,0,wx.ALL,5)
90 nino.borges 203 #workDirSizer = wx.BoxSizer(wx.HORIZONTAL)
91     #workDirSizer.Add(workDirStaticText,0,wx.ALL,5)
92     #workDirSizer.Add(self.workDirControl,0,wx.ALL,5)
93     #workDirSizer.Add(workDirBrowseButton,0,wx.ALL,5)
94 ninoborges 8 mainSizer = wx.BoxSizer(wx.VERTICAL)
95     mainSizer.Add(casesSizer,0,wx.ALL, 20)
96 nino.borges 203 #mainSizer.Add(workDirSizer,0,wx.ALL, 10)
97 ninoborges 8 mainSizer.Add(copyUpTypeStaticBoxSizer, 0, wx.ALL, 10)
98     mainSizer.Add(self.requestAssistanceCheckBox,0,wx.ALL|wx.ALIGN_CENTER,5)
99 nino.borges 203
100    
101 ninoborges 8 mainSizer.Add(self.buttonSizer,0, wx.ALL|wx.ALIGN_BOTTOM|wx.ALIGN_CENTER, 10)
102    
103     self.panel.SetSizer(mainSizer)
104 nino.borges 189 self.CreateMenuBar()
105 ninoborges 8 self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, self.radio1)
106     self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, self.radio2)
107 nino.borges 203 self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, self.radio3)
108     #self.Bind(wx.EVT_BUTTON, self.OnBrowseClick, workDirBrowseButton)
109 ninoborges 8 self.Bind(wx.EVT_BUTTON, self.OnBrowseClick, self.fileBowserButton)
110     self.Bind(wx.EVT_BUTTON, self.OnBrowseClick, self.dirBowserButton)
111 nino.borges 203 self.Bind(wx.EVT_BUTTON, self.OnBrowseClick, self.vendorBowserButton)
112 ninoborges 8 self.Bind(wx.EVT_BUTTON, self.OnProcess, self.oKButton)
113     self.Bind(wx.EVT_BUTTON, self.CloseWindow, self.cancelButton)
114    
115     def OnRadio(self,event):
116     radioObj = event.GetEventObject()
117     selection = radioObj.GetLabel()
118     if selection == "Individual File":
119     self.fileBowserControl.Enable(True)
120     self.fileBowserButton.Enable(True)
121    
122     self.dirBowserControl.Enable(False)
123     self.dirBowserButton.Enable(False)
124 nino.borges 203 self.vendorBowserControl.Enable(False)
125     self.vendorBowserButton.Enable(False)
126    
127 ninoborges 8 self.dirBowserControl.SetValue("")
128 nino.borges 203 self.vendorBowserControl.SetValue("")
129    
130     elif selection == "Entire folder of Files":
131     self.dirBowserControl.Enable(True)
132     self.dirBowserButton.Enable(True)
133    
134     self.fileBowserControl.Enable(False)
135     self.fileBowserButton.Enable(False)
136     self.vendorBowserControl.Enable(False)
137     self.vendorBowserButton.Enable(False)
138    
139     self.fileBowserControl.SetValue("")
140     self.vendorBowserControl.SetValue("")
141    
142 ninoborges 8 else:
143 nino.borges 203 self.vendorBowserControl.Enable(True)
144     self.vendorBowserButton.Enable(True)
145    
146 ninoborges 8 self.fileBowserControl.Enable(False)
147     self.fileBowserButton.Enable(False)
148 nino.borges 203 self.dirBowserControl.Enable(False)
149     self.dirBowserButton.Enable(False)
150    
151 ninoborges 8 self.fileBowserControl.SetValue("")
152 nino.borges 203 self.dirBowserControl.SetValue("")
153 ninoborges 8
154     #if self.selectedText:
155     # self.selectedText.Enable(False)
156     #radioSelected = event.GetEventObject()
157     #text = self.texts[radioSelected.GetLabel()]
158     #text.Enable(True)
159     #self.selectedText = text
160    
161     def OnBrowseClick(self,event):
162     eventCode = event.GetId()
163     #print eventCode
164 nino.borges 203 #if eventCode == -209:
165     # dlg = wx.DirDialog(self, message = "Working Directory Path: ", defaultPath = os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working"))
166     # if dlg.ShowModal() == wx.ID_OK:
167     # dirPath = dlg.GetPath()
168     # dlg.Destroy()
169     # self.workDirControl.SetValue(dirPath)
170 ninoborges 8 if eventCode == -209:
171     dlg = wx.FileDialog(self, message="Select file to copy up:",defaultDir=os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working"), defaultFile="",wildcard= "*.*",style=wx.OPEN | wx.CHANGE_DIR)
172     #dlg = wx.FileDialog(self, message = "Select directory to copy up: ", defaultPath = os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working"))
173     if dlg.ShowModal() == wx.ID_OK:
174     filePath = dlg.GetPath()
175     dlg.Destroy()
176 nino.borges 235 ## Test here to see if it's a zip. if not, give them warning about uncompressed size.
177 nino.borges 266 if os.path.splitext(filePath)[1].upper() in MCP_Lib.GetArchiveFileTypeList():
178     if os.path.splitext(filePath)[1].upper() == ".ZIP":
179     pass
180     else:
181     warningDlg = wx.MessageDialog(self,"MCP: You are attempting to copy an archive file that is not ZIP. The COMPRESSED SIZE will be gathered only.\nPlease change this size, once uncompressed, in View Edit.","WARNING!",wx.OK | wx.ICON_INFORMATION)
182     warningDlg.ShowModal()
183     warningDlg.Destroy()
184 ninoborges 8 self.fileBowserControl.SetValue(filePath)
185 nino.borges 203 elif eventCode == -213:
186 ninoborges 8 dlg = wx.DirDialog(self, message = "Select directory to copy up:", defaultPath = os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working"))
187     if dlg.ShowModal() == wx.ID_OK:
188     dirPath = dlg.GetPath()
189     dlg.Destroy()
190     self.dirBowserControl.SetValue(dirPath)
191 nino.borges 203 elif eventCode == -216:
192 nino.borges 232 platform = self.platformListChoice.GetStringSelection()
193     if platform == 'Concordance LN':
194     platform = 'Concordance'
195     elif platform == 'Concordance DIS':
196     platform = None
197     if platform:
198     expdtObj = MCP_Lib.ExpeDatConnection(platform)
199     caseName = self.casesListChoice.GetStringSelection()
200     clientMatter = caseName.split("_(")[1]
201     clientMatter = clientMatter[:-1]
202     clientMatter = clientMatter.replace('-','.')
203     vendorFolder = self.accessDB.GetVendorFolderPath(clientMatter)
204     if vendorFolder:
205     folderMatrix = expdtObj.GatherFullDirListMatrix('Uploads/%s'%vendorFolder)
206     dlg = VendorBrowserDialog(self,vendorFolder,folderMatrix)
207     if dlg.ShowModal() == wx.ID_OK:
208     vendorPath = dlg.GetValues()
209     dlg.Destroy()
210 nino.borges 266 if os.path.splitext(vendorPath)[1].upper() in MCP_Lib.GetArchiveFileTypeList():
211     if os.path.splitext(vendorPath)[1].upper() == ".ZIP":
212     pass
213     else:
214     warningDlg = wx.MessageDialog(self,"MCP: You are attempting to copy an archive file that is not ZIP. The COMPRESSED SIZE will be gathered only. Please change this value when you uncompress, in View Edit.","WARNING!",wx.OK | wx.ICON_INFORMATION)
215     warningDlg.ShowModal()
216     warningDlg.Destroy()
217 nino.borges 232 self.vendorBowserControl.SetValue(vendorPath)
218     else:
219     diag = wx.MessageDialog(self,"MCP: No vendor folder is currently linked to this case.","Does not exist",wx.OK | wx.ICON_INFORMATION)
220     diag.ShowModal()
221     diag.Destroy()
222     else:
223     diag = wx.MessageDialog(self,"MCP: Copying from LN to DIS is not yet supported.","ERROR",wx.OK | wx.ICON_INFORMATION)
224     diag.ShowModal()
225     diag.Destroy()
226 ninoborges 8
227     def CreateBoxesSection(self):
228     self.oKButton = wx.Button(self.panel, wx.ID_OK)
229     self.oKButton.SetDefault()
230     self.oKButton.SetSize(self.oKButton.GetBestSize())
231     self.cancelButton = wx.Button(self.panel, wx.ID_CANCEL)
232     self.cancelButton.SetSize(self.cancelButton.GetBestSize())
233     self.buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
234     self.buttonSizer.Add(self.oKButton,0,wx.ALL,10)
235     self.buttonSizer.Add(self.cancelButton,0,wx.ALL,10)
236    
237 nino.borges 189 def MenuData(self):
238     return(("View",
239     ("My Cases", "Chooses from your assigned cases.",self.OnChangeCaseView,"RADIO"),
240     ("My Office Cases", "Chooses from cases assigned to everyone in your office.",self.OnChangeCaseView,"RADIO"),
241     ("All Cases", "Chooses from all cases.",self.OnChangeCaseView,"RADIO")),
242 nino.borges 203 ("&Settings",
243     ("&Working Directory", "Allows you to change the local Buffer directory.", self.OnChangeWorkDir,"")),
244 nino.borges 189 ("&Help",
245     ("&About", "Displays the About Window.", self.OnAbout,"")))
246    
247     def CreateMenuBar(self):
248     menuBar = wx.MenuBar()
249     count = 1
250     for eachMenuData in self.MenuData():
251     menuLabel = eachMenuData[0]
252     menuItems = eachMenuData[1:]
253     menuBar.Append(self.CreateMenu(menuItems), menuLabel)
254     count = count + 1
255     self.SetMenuBar(menuBar)
256    
257    
258     def CreateMenu(self, menuData):
259     menu = wx.Menu()
260     for eachLabel, eachStatus, eachHandler, eachType in menuData:
261     if not eachLabel:
262     menu.AppendSeparator()
263     continue
264     if eachType == "RADIO":
265     menuItem = menu.AppendRadioItem(-1,eachLabel,eachStatus)
266     else:
267     menuItem = menu.Append(-1, eachLabel, eachStatus)
268     self.Bind(wx.EVT_MENU, eachHandler, menuItem)
269     return menu
270    
271 ninoborges 8 def CloseWindow(self, event):
272     self.Close(True)
273 nino.borges 189
274     def OnChangeCaseView(self,event):
275     self.casesListChoice.Clear()
276     eventID = event.GetId()
277     if eventID == 100:
278     #change it to my cases
279     self.casesListChoice.SetItems(self.myCases)
280    
281    
282     if eventID == 101:
283     #change it to office cases
284     self.casesListChoice.SetItems(self.officeCases)
285    
286    
287     if eventID == 102:
288     #change it to all cases
289     self.casesListChoice.SetItems(self.allCases)
290    
291    
292 nino.borges 203 def OnChangeWorkDir(self,event):
293 nino.borges 258 dlg = WorkDirDialog.WorkDirDialog(self, self.workDir)
294     if dlg.ShowModal() == wx.ID_OK:
295     self.workDir = dlg.GetValues()
296     #print self.workDir
297     dlg.Destroy()
298    
299 ninoborges 8
300     def OnProcess(self, event):
301     caseName = self.casesListChoice.GetStringSelection()
302     platform = self.platformListChoice.GetStringSelection()
303 nino.borges 235 ## CHANGE to the new place
304     #workDir = self.workDirControl.GetValue()
305 nino.borges 258 #workDir = os.path.join(os.environ.get("USERPROFILE"),"Desktop\\Working")
306 nino.borges 235
307 ninoborges 8 if self.radio1.GetValue():
308     startSelection = self.fileBowserControl.GetValue()
309 nino.borges 236 sourceMediaLocation = 'local'
310     elif self.radio2.GetValue():
311     startSelection = self.dirBowserControl.GetValue()
312     sourceMediaLocation = 'local'
313 ninoborges 8 else:
314 nino.borges 236 startSelection = self.vendorBowserControl.GetValue()
315     sourceMediaLocation = 'remote'
316 ninoborges 8 #startSelection = r"C:\Documents and Settings\eborges\Desktop\Working\Misc_Documents.zip"
317     self.Show(False)
318     #print "workdir is %s"%workDir
319 nino.borges 258 MCP_CopyUp_Request.Process(caseName, self.workDir, startSelection, platform, sourceMediaLocation)
320 ninoborges 8
321     #diag = wx.MessageDialog(self,"All Items processed and copied!!", "Complete",wx.OK | wx.ICON_INFORMATION)
322     #diag.ShowModal()
323     #diag.Destroy()
324     self.Destroy()
325    
326 nino.borges 189 def OnAbout(self, event):
327     """
328     OnAbout(self,event) Displays an about dialog with developer and bug reporting info
329     """
330     dlg = wx.MessageDialog(self, "MCP is a case organization program.\n"
331     "\n\n"
332     "For questions or comments about this program\n"
333     "or to report a bug, please email the program\n"
334     "creator at Nino.Borges@gmail.com\n\n"
335     "MCP is\n"
336     "Copyright (c) 2011 Emanuel Borges.\n"
337     "All rights reserved.\n"
338     "(Nino.Borges@gmail.com)\n",
339     "About MCP", wx.OK | wx.ICON_INFORMATION)
340     dlg.ShowModal()
341     dlg.Destroy()
342 ninoborges 8
343    
344 nino.borges 203 class VendorBrowserDialog(wx.Dialog):
345     def __init__(self, parent, vendorFolder, treeMatrix):
346     wx.Dialog.__init__(self, parent, -1, "Vendor Folder Browser", style = wx.DEFAULT_DIALOG_STYLE, size = (300,400))
347     #wx.Dialog.__init__(self, parent,title= "Vendor Folder Browser", size = (300,400))
348     self.vendorFolder = vendorFolder
349    
350     il = wx.ImageList(16,16)
351     self.fldridx = il.Add(wx.ArtProvider.GetBitmap(wx.ART_FOLDER,wx.ART_OTHER, (16,16)))
352     self.fldropenidx = il.Add(wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN,wx.ART_OTHER, (16,16)))
353     self.fileidx = il.Add(wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE,wx.ART_OTHER, (16,16)))
354    
355     self.vendorTree = wx.TreeCtrl(self, size=(200,310))
356     self.vendorTree.AssignImageList(il)
357    
358     rootVendorFolderId = self.vendorTree.AddRoot(vendorFolder)
359    
360     self.AddTreeNodes(rootVendorFolderId, treeMatrix)
361     #childVendorFolderId2 = self.vendorTree.AppendItem(rootVendorFolderId,"test2")
362     #childVendorFolderId = self.vendorTree.AppendItem(childVendorFolderId2,"test")
363     self.vendorTree.Expand(rootVendorFolderId)
364    
365    
366     self.vendorTree.SetItemImage(rootVendorFolderId, self.fldridx, wx.TreeItemIcon_Normal)
367     self.vendorTree.SetItemImage(rootVendorFolderId, self.fldropenidx, wx.TreeItemIcon_Expanded)
368     ## this will need a if its a file do this else do the previous
369     #self.vendorTree.SetItemImage(childVendorFolderId, self.fileidx, wx.TreeItemIcon_Normal)
370    
371     mainSizer = wx.BoxSizer(wx.VERTICAL)
372     mainSizer.Add(self.vendorTree, 0, wx.EXPAND|wx.ALL, 5)
373    
374     oKButton = wx.Button(self, wx.ID_OK)
375     oKButton.SetDefault()
376     cancelButton = wx.Button(self, wx.ID_CANCEL)
377     buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
378     buttonSizer.Add(oKButton,0,wx.ALL,5)
379     buttonSizer.Add(cancelButton,0,wx.ALL,5)
380     mainSizer.Add(buttonSizer, 0, wx.ALIGN_CENTER|wx.ALL, 15)
381     self.SetSizer(mainSizer)
382     self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, self.vendorTree)
383 ninoborges 8
384 nino.borges 203 def AddTreeNodes(self, parentItem, items):
385     """
386     Recursively traverses the data structure, adding tree nodes to
387     match it.
388     """
389     for item in items:
390     if type(item) == str:
391     newItem = self.vendorTree.AppendItem(parentItem, item)
392     #self.tree.SetItemText(newItem, "A description of %s" % item, 1)
393     self.vendorTree.SetItemImage(newItem, self.fileidx,
394     wx.TreeItemIcon_Normal)
395     else:
396     newItem = self.vendorTree.AppendItem(parentItem, item[0])
397     #self.tree.SetItemText(newItem, "A description of %s" % item[0], 1)
398     self.vendorTree.SetItemImage(newItem, self.fldridx,
399     wx.TreeItemIcon_Normal)
400     self.vendorTree.SetItemImage(newItem, self.fldropenidx,
401     wx.TreeItemIcon_Expanded)
402    
403     self.AddTreeNodes(newItem, item[1])
404    
405     def OnSelChanged(self, event):
406     self.item = event.GetItem()
407     if self.item:
408     self.vendorFileSelected = self.vendorTree.GetItemText(self.item)
409     event.Skip()
410    
411     def GetValues(self):
412     vendorPath = self.vendorFileSelected
413     upItem = self.vendorTree.GetItemParent(self.item)
414     while upItem:
415     vendorPath = os.path.join(self.vendorTree.GetItemText(upItem),vendorPath)
416     upItem = self.vendorTree.GetItemParent(upItem)
417     return vendorPath
418    
419    
420 ninoborges 8 class MyApp(wx.App):
421     def OnInit(self):
422     prgVersion = MCP_Lib.GetMCPVersion()
423     self.frame = MyFrame(None, -1, "MCP Copy Up Request %s"%prgVersion)
424     self.frame.Show(True)
425     self.SetTopWindow(self.frame)
426     return True
427    
428    
429     if __name__ == '__main__':
430     app = MyApp(0)
431     app.MainLoop()