<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getName(self):
 		"""Return a Name string for this object."""


		name=self.findattr('name')
		if not name:
			name="_directinput_"
			if self.classname().lower()=="line":
				name+="."+str(self).replace(" ","_").lower()
		else:
			name=name.replace('.txt','')

		while name.startswith("."):
			name=name[1:]

		return name