loremipsum 1.0.2
A Lorem Ipsum text generator
Downloads ↓ | 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 | # downloads |
|---|---|---|---|---|---|
| loremipsum-1.0.2-py2.5.egg (md5) | Python Egg | 2.5 | 2011-08-29 | 20KB | 366 |
| loremipsum-1.0.2-py2.6.egg (md5) | Python Egg | 2.6 | 2011-08-29 | 20KB | 396 |
| loremipsum-1.0.2-py2.7.egg (md5) | Python Egg | 2.7 | 2011-08-29 | 20KB | 532 |
| loremipsum-1.0.2.tar.gz (md5) | Source | 2011-08-29 | 17KB | 303 | |
| loremipsum-1.0.2.zip (md5) | Source | 2011-08-29 | 22KB | 240 | |
- Author: Luca De Vitis
- Documentation: loremipsum package documentation
- Home Page: http://projects.monkeython.com/loremipsum
- Keywords: lorem,ipsum,text,generator
-
Categories
- Development Status :: 5 - Production/Stable
- Intended Audience :: Developers
- License :: OSI Approved :: GNU General Public License (GPL)
- Operating System :: OS Independent
- Programming Language :: Python :: 2.5
- Programming Language :: Python :: 2.6
- Programming Language :: Python :: 2.7
- Topic :: Software Development :: Libraries :: Python Modules
- Package Index Owner: monkeython
- DOAP record: loremipsum-1.0.2.xml
