skip to navigation
skip to content

Not Logged In

loremipsum 1.0.2

A Lorem Ipsum text generator

Package Documentation

You may import the Generator class to instantiate your generator with your own sample text and a dictionary:

>>> from loremipsum import Generator
>>>
>>> sample = file('data/sample.txt').read()
>>> dictionary = file('data/dictionary.txt').read().split()
>>>
>>> g = Generator(sample, dictionary)
>>> g.generate_sentence() #doctest: +ELLIPSIS
(...)
>>>

or just import get_sentences or get_paragraphs which interface to a module wide Generator instance.

>>> from loremipsum import get_paragraphs, get_sentences
>>>
>>> get_sentences(5) #doctest: +ELLIPSIS
['...', '...', '...', '...', '...']
>>> get_paragraphs(3) #doctest: +ELLIPSIS
['...', '...', '...']
 
File Type Py Version Uploaded on Size
loremipsum-1.0.2-py2.5.egg (md5) Python Egg 2.5 2011-08-29 20KB
loremipsum-1.0.2-py2.6.egg (md5) Python Egg 2.6 2011-08-29 20KB
loremipsum-1.0.2-py2.7.egg (md5) Python Egg 2.7 2011-08-29 20KB
loremipsum-1.0.2.tar.gz (md5) Source 2011-08-29 17KB
loremipsum-1.0.2.zip (md5) Source 2011-08-29 22KB
  • Downloads (All Versions):
  • 126 downloads in the last day
  • 1789 downloads in the last week
  • 7575 downloads in the last month