def create_work_name(name):
 strip_ext = ['.nzb', '.par', '.par2']
 name = name.strip()
 if (name.find('://') < 0):
  (name_base, ext) = os.path.splitext(name)
  while (ext.lower() in strip_ext):
   name = name_base
   (name_base, ext) = os.path.splitext(name)
  return name.strip()
 else:
  return name.strip()

def create_work_name ( name ) : strip_ext = [ '.nzb' , '.par' , '.par2' ] name = name . strip ( ) if ( name . find ( '://' ) < 0 ) : ( name_base , ext ) = os . path . splitext ( name ) while ( ext . lower ( ) in strip_ext ) : name = name_base ( name_base , ext ) = os . path . splitext ( name ) return name . strip ( ) else : return name . strip ( )
remove " .