Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        	@staticmethod
	def get_type(value):
		# Using value.__class__ over isinstance for speed
		if value.__class__ in six.string_types:
			if len(value) > 0 and value[0] == '=':
				return DataTypes.FORMULA
			else:
				return DataTypes.INLINE_STRING
		# not using in (int, float, long, complex) for speed
		elif value.__class__ in DataTypes._numberTypes:
			return DataTypes.NUMBER
		# fall back to the slower isinstance
		elif isinstance(value, six.string_types):
			if len(value) > 0 and value[0] == '=':
				return DataTypes.FORMULA
			else:
				return DataTypes.INLINE_STRING
		elif isinstance(value, DataTypes._numberTypes):
			return DataTypes.NUMBER
		elif HAS_NUMPY and isinstance(value, (np.floating, np.integer, np.complexfloating, np.unsignedinteger)):
			return DataTypes.NUMBER
		elif isinstance(value, (datetime, date, time)):
			return DataTypes.DATE
		else:
			return DataTypes.ERROR
        


src/p/y/PyExcelerate-0.5.0/pyexcelerate/Worksheet.py   PyExcelerate(Download)
		if y not in self._cells[x]:
			return None
		type = DataTypes.get_type(self._cells[x][y])
		if type == DataTypes.FORMULA:
			# remove the equals sign
	def set_cell_value(self, x, y, value):
		if x not in self._cells:
			self._cells[x] = {}
		if DataTypes.get_type(value) == DataTypes.DATE:
			self.get_cell_style(x, y).format = Format.Format('yyyy-mm-dd')
	def __get_cell_data(self, cell, x, y, style):
		if cell is None:
			return "" # no cell data
		if cell not in self._cell_cache:
			type = DataTypes.get_type(cell)