# Path: SCException.py
# class SCNotImplemented (SCException):
# 	"""See SCException. Called if implementation is missing."""
# 
# 	def __init__(self, cls, function, reason):
# 		SCException.__init__(self, cls, function, reason)
# 
# class HFHException(SCException):
# 	"""See SCException. Called for exceptions during parsing header fields."""
# 
# 	def __init__(self, cls, function, reason):
# 		SCException.__init__(self, cls, function, reason)


from HeaderFieldHandler import HeaderFieldHandler
from SCException import SCNotImplemented, HFHException
import Log
		if self.method != other.method:
			ret = ret + 1
		return ret

	def parse(self, value):
		v = value.replace("\t", "").replace("\r", "").strip()
		# FIXME should be LWS
		sep = v.find(" ")
		if (sep != -1):
			if v[:sep].rstrip().isdigit():
				self.number = long(v[:sep].rstrip())
			else:
				self.number = v[:sep].rstrip()
			self.method = v[sep+1:].lstrip()
		else:
			Log.logDebug("CSeq.parse(): seperator between number and method missing", 1)
			if v.isdigit():
				self.number = v
				Log.logDebug("CSeq.parse(): guessing: number only", 1)
			else:
				self.method = v
				Log.logDebug("CSeq.parse(): falied to parse, using method only", 1)
				#raise HFHException("CSeq", "parse", "failed to parse because number/method seperator missing")

	def create(self):
		if self.number is None:
			num = ''
		else:
			num = str(self.number)
		if self.method is None:

# Path: SCException.py
# class SCNotImplemented (SCException):
# 	"""See SCException. Called if implementation is missing."""
# 
# 	def __init__(self, cls, function, reason):
# 		SCException.__init__(self, cls, function, reason)
# 
# class HFHException(SCException):
# 	"""See SCException. Called for exceptions during parsing header fields."""
# 
# 	def __init__(self, cls, function, reason):
# 		SCException.__init__(self, cls, function, reason)


# Path: HFH/Cseq.py
from HeaderFieldHandler import HeaderFieldHandler
from SCException import SCNotImplemented, HFHException
import Log

		if self.method != other.method:
			ret = ret + 1
		return ret

	def parse(self, value):
		v = value.replace("\t", "").replace("\r", "").strip()
		# FIXME should be LWS
		sep = v.find(" ")
		if (sep != -1):
			if v[:sep].rstrip().isdigit():
				self.number = long(v[:sep].rstrip())
			else:
				self.number = v[:sep].rstrip()
			self.method = v[sep+1:].lstrip()
		else:
			Log.logDebug("CSeq.parse(): seperator between number and method missing", 1)
			if v.isdigit():
				self.number = v
				Log.logDebug("CSeq.parse(): guessing: number only", 1)
			else:
				self.method = v
				Log.logDebug("CSeq.parse(): falied to parse, using method only", 1)
				#raise HFHException("CSeq", "parse", "failed to parse because number/method seperator missing")

	def create(self):
		if self.number is None:
			num = ''
		else:
			num = str(self.number)
		if self.method is None:

			meth = ''