def refreshList(self, path = '/Volumes/fs3/encoding/AssetManagement/nbc_incoming/'):								#set default path
		workbook = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER-test.xls'
		print path
		self.incomingFilePath = path
		incomingList = sc.getFilenames(path)																#get new filenames
		print incomingList
		xlsDic = si.breakdownXLS(workbook)
		listofmatches = sc.findMatches(incomingList, xlsDic)																#get duplicates#
############## HALT DUPLICATE DETECTION UNTIL MAIN EXCEL SPREADSHEET IS USED ########################
#		for duplicate in listofmatches:																					#remove duplicates from new file list
#			try:
#				incomingList.remove(duplicate)							
#			except ValueError, e:
#				print e

		tempFilenameOutput = open('/Volumes/dam/_NBCU/EntryScriptOutput/._tempfilenameoutput.txt', 'wb')		
		for thisFile in incomingList:
			tempFilenameOutput.write(thisFile.filename+'\n')
		tempFilenameOutput.close()
		
#		root = tk.Toplevel()
#		print "root:", root
#		cne.ControlNumberEntryWindow(incomingList, xlsDic, workbook, root)
		
		#create c# entry screen/insert into database				
		self.createListBox(0,0,80,30,"Incoming Files", incomingList)														#put list information on gui
Exemplo n.º 2
0
    def refreshList(self,
                    path='/Volumes/fs3/encoding/AssetManagement/nbc_incoming/'
                    ):  #set default path
        workbook = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER-test.xls'
        print path
        self.incomingFilePath = path
        incomingList = sc.getFilenames(path)  #get new filenames
        print incomingList
        xlsDic = si.breakdownXLS(workbook)
        listofmatches = sc.findMatches(incomingList, xlsDic)  #get duplicates#
        ############## HALT DUPLICATE DETECTION UNTIL MAIN EXCEL SPREADSHEET IS USED ########################
        #		for duplicate in listofmatches:																					#remove duplicates from new file list
        #			try:
        #				incomingList.remove(duplicate)
        #			except ValueError, e:
        #				print e

        tempFilenameOutput = open(
            '/Volumes/dam/_NBCU/EntryScriptOutput/._tempfilenameoutput.txt',
            'wb')
        for thisFile in incomingList:
            tempFilenameOutput.write(thisFile.filename + '\n')
        tempFilenameOutput.close()

        #		root = tk.Toplevel()
        #		print "root:", root
        #		cne.ControlNumberEntryWindow(incomingList, xlsDic, workbook, root)

        #create c# entry screen/insert into database
        self.createListBox(0, 0, 80, 30, "Incoming Files",
                           incomingList)  #put list information on gui
Exemplo n.º 3
0
	def refreshList(self,excelfile='/Volumes/fs3/encoding/AssetManagement/NBCU_Features_Series_MASTER.xls', path='/Volumes/fs3/encoding/AssetManagement/nbc_incoming/'):								#set default path
		try:
			incomingList = sc.getFilenames(path)																#get new filenames
			workbook = si.breakdownXLS(excelfile)
			listofmatches = sc.findMatches(incomingList, workbook)																#get duplicates
			for duplicate in listofmatches:																					#remove duplicates from new file list
				incomingList.remove(duplicate)	
			incomingList.sort()						
			workbook = si.insertNewRows(incomingList, workbook)																			#append new files to spreadsheet
			si.updateWorkbook(workbook)				
		except IndexError, e:
			print e
	def refreshList(self, path = '/Volumes/fs3/encoding/AssetManagement/nbc_incoming/'):								#set default path
		workbook = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER-test.xls'
		print path
		self.incomingFilePath = path
		incomingList = sc.getFilenames(path)																#get new filenames
		xlsDic = si.breakdownXLS(workbook)
		listofmatches = sc.findMatches(incomingList, xlsDic)																#get duplicates
		for duplicate in listofmatches:																					#remove duplicates from new file list
			incomingList.remove(duplicate)							
		si.insertNewRows(incomingList, xlsDic)																			#append new files to spreadsheet
		si.updateWorkbook(workbook, xlsDic)				
		self.createListBox(0,0,80,30,"Incoming Files", incomingList)														#put list information on gui
		self.createListBox(0,1,80,20,"Duplicates", listofmatches)
Exemplo n.º 5
0
	def refreshList(self):
		workbook = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER.xls'
		TESTOUTPUT = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER.xls'

		incomingList = sc.getFilenames(self.incomingFilePath)																#get new filenames
#		print incomingList
		xlsDic = si.breakdownXLS(workbook)
		listofmatches = sc.findMatches(incomingList, xlsDic)																#get duplicates
		for duplicate in listofmatches:																					#remove duplicates from new file list
#			print duplicate.filename
			incomingList.remove(duplicate)							
		si.insertNewRows(incomingList, xlsDic)																			#append new files to spreadsheet
		si.updateWorkbook(TESTOUTPUT, xlsDic)																			#update .xls file
		self.createListBox(0,0,30,"Incoming Files", incomingList)														#put list information on gui
		self.createListBox(0,1,20,"Duplicates",listofmatches)
 def refreshList(self,
                 path='/Volumes/fs3/encoding/AssetManagement/nbc_incoming/'
                 ):  #set default path
     workbook = '/Volumes/dam/OPERATOR/AKARAMIAN/armenScripts/python/spreadsheetChecker/NBCU_Features_Series_MASTER-test.xls'
     print path
     self.incomingFilePath = path
     incomingList = sc.getFilenames(path)  #get new filenames
     xlsDic = si.breakdownXLS(workbook)
     listofmatches = sc.findMatches(incomingList, xlsDic)  #get duplicates
     for duplicate in listofmatches:  #remove duplicates from new file list
         incomingList.remove(duplicate)
     si.insertNewRows(incomingList,
                      xlsDic)  #append new files to spreadsheet
     si.updateWorkbook(workbook, xlsDic)
     self.createListBox(0, 0, 80, 30, "Incoming Files",
                        incomingList)  #put list information on gui
     self.createListBox(0, 1, 80, 20, "Duplicates", listofmatches)