def create_cloud(oname, words, maxsize=120, fontname='Lobster'):
 try:
  from pytagcloud import create_tag_image, make_tags
 except ImportError:
  if (not warned_of_error):
   print('Could not import pytagcloud. Skipping cloud generation')
  return
 words = [(w, int((v * 10000))) for (v, w) in words]
 tags = make_tags(words, maxsize=maxsize)
 create_tag_image(tags, oname, size=(1800, 1200), fontname=fontname)

def create_cloud ( oname , words , maxsize = 120 , fontname = 'Lobster' ) : try : from pytagcloud import create_tag_image , make_tags except ImportError : if ( not warned_of_error ) : print ( 'Could not import pytagcloud. Skipping cloud generation' ) return words = [ ( w , int ( ( v * 10000 ) ) ) for ( v , w ) in words ] tags = make_tags ( words , maxsize = maxsize ) create_tag_image ( tags , oname , size = ( 1800 , 1200 ) , fontname = fontname )
creates a word cloud parameters oname : output filename words : list of maxsize : int .