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 tool reads files or stdin and outputs random lines.

Project Description


This tool reads files or stdin and outputs random lines.

randfilter is tested with Python 2.6, 2.7, 3.2, 3.3.


  • Python 2.6 / 2.7 / 3.2 / 3.3 or higher
  • docopt==0.6.1
  • schema==0.2.0


Install from pypi

easy_install randfilter


pip install randfilter

Install from github

git clone
cd randfilter
python install



    randfilter (-n <num> | -p <probability>) [-u | --unorder] [-i | --ignore-empty] [<files>...]
    randfilter -h | --help
    randfilter -v | --version

    <files>...          Choose and output lines at random in files. If omitted, use stdin.
    -n <num>            The choise number of lines.
    -p <probability>    The choise probability of lines. The value is 0.0 to 1.0.
    -u --unorder        Output lines are unordered.
    -i --ignore-empty   Ignore empty line.
    -h --help           Show this screen.
    -v --version        Show version.

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(3.8 kB) Copy SHA256 Hash SHA256
Source Nov 16, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting