def	post(self, sourceObject, targetPath, rename=None, mimetype='auto', mtime=None, egress_policy='COMPLETE', mkdir=False, callback=None, debug=True):
		if debug:
			logger.info( self.uid+" "+self.token+", post "+sourceObject+" "+targetPath+", rename="+str(rename)+", mimetype="+str(mimetype)+", mtime="+str(mtime)+", egress="+str(egress_policy)+", mkdir="+str(mkdir))
			if (not os.path.isfile(sourceObject)): logger.info( "local("+sourceObject+") does not exist") ; return False 
                	#dexists is not a thread safe call.  If your calling with multiple threads set debug=False, not only is it safe, it's faster
			if (not self.dexists(targetPath)): logger.info( "remote("+targetPath+") does not exist") ; return False

		sourcePath = os.path.dirname(sourceObject) 
		sourceName = os.path.basename(sourceObject)
		self.pbarfname = sourceName
	
		poster.streaminghttp.register_openers()
	
		datagen, headers = poster.encode.multipart_encode( {
			"uploadFile": open( os.path.join(sourcePath,sourceName), "rb"),
			"directory": targetPath,
			"basename": sourceName,
			"expose_egress": egress_policy
			}, cb=callback)

		request = Request(self.posturl, datagen, headers)

		request.add_header("X-Agile-Authorization", self.token)
		request.add_header("X-Content-Type", mimetype )

		success = False ; attempt = 0
		while not success:
			attempt += 1
			try: 
				result = urlopen(request).read() 
				if callback<>None: self.pbar.finish()
				self.pbar = None
				success = True
			except __HOLE__, e: 
				if callback<>None: self.pbar.finish()
				print '[!] HTTP Error: ', e.code
				self.pbar = None
				success = False
			except URLError, e: 
				if callback<>None: self.pbar.finish()
				print '[!] URL Error: ', e.reason
				self.pbar = None
				success = False
dataset/ETHPy150Open wylieswanson/AgileCLU/AgileCLU/__init__.py/AgileCLU.post