PEATSA/WebApp/Data.py
def addFileArgument(self, option, contentsAttribute, fileName=None):
	
		'''Adds an argument whose value reference a file to the job
		
		Params:
			option: A command line option for the program that does not specify a file
			contentsAttribute: The name of the method that supplies the file contents
			fileName: The name of the file to write the contents to'''
	
		if getattr(self, contentsAttribute) == None:
			raise AttributeError, 'Attribute %s does not exist - cannot use as content attribute' % contentsAttribute
	
		fileData = {'contentsAttribute':contentsAttribute}
		if fileName is not None:
			fileData['fileName'] = fileName
	
		fileArgs = self.fileArguments()
		fileArgs[option] = fileData
		data = SerializeDictionary(fileArgs)
		data = MySQLdb.escape_string(data)
		
		statement = """UPDATE %s SET FileArguments='%s' WHERE JobID='%s' """ % (self.jobTable, data, self.identification)
		self.cursor.execute(statement)
		self.connection.commit()
Adds an argument whose value reference a file to the job
		
		Params:
			option: A command line option for the program that does not specify a file
			contentsAttribute: The name of the method that supplies the file contents
			fileName: The name of the file to write the contents to
Adds an argument whose value reference a file to the job
Adds an argument whose value reference a file to the job
def addFileArgument(self, option, contentsAttribute, fileName=None):
		if getattr(self, contentsAttribute) == None:
			raise AttributeError, 'Attribute %s does not exist - cannot use as content attribute' % contentsAttribute
		fileData = {'contentsAttribute':contentsAttribute}
		if fileName is not None:
			fileData['fileName'] = fileName
		fileArgs = self.fileArguments()
		fileArgs[option] = fileData
		data = SerializeDictionary(fileArgs)
		data = MySQLdb.escape_string(data)
		statement = """UPDATE %s SET FileArguments='%s' WHERE JobID='%s' """ % (self.jobTable, data, self.identification)
		self.cursor.execute(statement)
		self.connection.commit()
def addFileArgument ( self , option , contentsAttribute , fileName = None ) : if getattr ( self , contentsAttribute ) == None : raise AttributeError , 'Attribute %s does not exist - cannot use as content attribute' % contentsAttribute fileData = { 'contentsAttribute' : contentsAttribute } if fileName is not None : fileData [ 'fileName' ] = fileName fileArgs = self . fileArguments ( ) fileArgs [ option ] = fileData data = SerializeDictionary ( fileArgs ) data = MySQLdb . escape_string ( data ) statement = """UPDATE %s SET FileArguments='%s' WHERE JobID='%s' """ % ( self . jobTable , data , self . identification ) self . cursor . execute ( statement ) self . connection . commit ( )
Adds an argument whose value reference a file to the job
Adds an argument whose value reference a file to the job
'''Adds an argument whose value reference a file to the job
		
		Params:
			option: A command line option for the program that does not specify a file
			contentsAttribute: The name of the method that supplies the file contents
			fileName: The name of the file to write the contents to'''
self
option
A command line option for the program that does not specify a file
A command line option for the program that does not specify a file
contentsAttribute
The name of the method that supplies the file contents
The name of the method that supplies the file contents
fileName
The name of the file to write the contents to
The name of the file to write the contents to