def name_check(package_name,max_len=15):
    """
    By convention, packages and modules have short, all-lowercase names 
    made up of alphabetical characters and underscores.
    
    Cast to lower, replace dashes by underscores, remove periods and shorten if needed.
    """
    name=package_name.lower()
    name=name.replace("-","_")
    name=name.replace(".","")
    if not name.replace("_","").isalpha():
        return False
    return name[:max_len]