Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

This module implements partially perl formats in python.

Project Description

This module has been written for a particular need: to print easily small pieces of information in a pretty way, such as the output of the UNIX df command. That’s why the whole page management stuff has been let down.

Existing perl formats should be usable as is.

>>> from perlformats import PerlFormat
>>> myformat = """
... @<<<<<<<<<<<<<<<<<< @||||||| @<<<<<<@>>>> @>>>> @<<<<<<<<<<<<<<<<<
... name,              $login,  $office,$uid,$gid, $home
... """
>>> pf = PerlFormat(myformat)
>>> mydata = { '$login': 'jsmith', '$office': 'F125',
...             '$uid': '1234', '$gid': '25', '$home': '/home/jsmith' }
>>>   # An object contains a value
'John Smith'
>>> print pf.format(mydata, person) # Values may be searched in several places
John Smith           jsmith  F125    1234    25 /home/jsmith

Release History

This version
History Node


Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate