code/drinks_lib.py
def delete_recipe(recipe):
	""" deletes recipe 
	- recipe: either in index of recipe_list, or String for recipe name
	"""
	print("[DR DelR]", "1/ starting deleting procedure")

	if type(recipe) != int and type(recipe) != str:		# break when input type not correct
		return
	print("[DR DelR]", "2/ correct input type")

	if type(recipe) == int:								# get recipe name when index given
		recipe = recipes[recipe]
	print("[DR DelR]", "3/ got recipe name from index (if needed)")

	if recipe in gl.immutable_recipes:					# check if recipe is immutable / can't be deleted
		print("[DR DelR] 4/ abort, recipe is immutable")
		return False
	print("[DR DelR] 4/ recipe is allowed to be deleted")

	os.remove(gl.gen_path + "/src/recipes/" + recipe)	# delete recipe
	print("[DR DelR] 5/ recipe successfully deleted")

	update_recipes_and_drinks()							# update recipe and drinks list
	print("[DR DelR] 6/ updated recipes and drinks")

	print("[DR DelR] all done")
	return True
 deletes recipe 
	- recipe: either in index of recipe_list, or String for recipe name
	
deletes recipe
recipe: either in index of recipe_list, or String for recipe name
deletes recipe recipe : either in index of recipe_list or String for recipe name
def delete_recipe(recipe):
	print("[DR DelR]", "1/ starting deleting procedure")
	if type(recipe) != int and type(recipe) != str:		
		return
	print("[DR DelR]", "2/ correct input type")
	if type(recipe) == int:								
		recipe = recipes[recipe]
	print("[DR DelR]", "3/ got recipe name from index (if needed)")
	if recipe in gl.immutable_recipes:					
		print("[DR DelR] 4/ abort, recipe is immutable")
		return False
	print("[DR DelR] 4/ recipe is allowed to be deleted")
	os.remove(gl.gen_path + "/src/recipes/" + recipe)	
	print("[DR DelR] 5/ recipe successfully deleted")
	update_recipes_and_drinks()							
	print("[DR DelR] 6/ updated recipes and drinks")
	print("[DR DelR] all done")
	return True
def delete_recipe ( recipe ) : print ( "[DR DelR]" , "1/ starting deleting procedure" ) if type ( recipe ) != int and type ( recipe ) != str : return print ( "[DR DelR]" , "2/ correct input type" ) if type ( recipe ) == int : recipe = recipes [ recipe ] print ( "[DR DelR]" , "3/ got recipe name from index (if needed)" ) if recipe in gl . immutable_recipes : print ( "[DR DelR] 4/ abort, recipe is immutable" ) return False print ( "[DR DelR] 4/ recipe is allowed to be deleted" ) os . remove ( gl . gen_path + "/src/recipes/" + recipe ) print ( "[DR DelR] 5/ recipe successfully deleted" ) update_recipes_and_drinks ( ) print ( "[DR DelR] 6/ updated recipes and drinks" ) print ( "[DR DelR] all done" ) return True
deletes recipe
 recipe: either in index of recipe_list, or String for recipe name
deletes recipe recipe : either in index of recipe_list or String for recipe name
""" deletes recipe 
	- recipe: either in index of recipe_list, or String for recipe name
	""" # break when input type not correct # get recipe name when index given # check if recipe is immutable / can't be deleted # delete recipe # update recipe and drinks list
recipe