A Lorem Ipsum text generator
Project description
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 ['...', '...', '...']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
loremipsum-1.0.2.zip
(22.7 kB
view hashes)
loremipsum-1.0.2.tar.gz
(18.2 kB
view hashes)
Built Distributions
loremipsum-1.0.2-py2.7.egg
(20.8 kB
view hashes)
loremipsum-1.0.2-py2.6.egg
(20.9 kB
view hashes)
loremipsum-1.0.2-py2.5.egg
(20.9 kB
view hashes)