Retrieving a line at random from a file

Category: Python - Miscellaneous

This procedure reads through a file of unknown size once, returning a random line from the file. Date: 06 May, 2012


Random Line - Retrieving Line - Text Manipulation - Random - Line - Text

Homepage: http://code.activestate.com

Developer: code.activestate.com

License: Artistic License, GNU General Public License (GPL)

Operating System: Windows, Linux, Mac OS, BSD, Solaris

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Random Line Loader loads a file into memory one line at a time.

developer Developer: phpbuilder.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This is a PHP5 only class to facilitate the stemming of word.

developer Developer: rgraph.net?downloads
license License: Freeware
operating systems Operating System: All


TEA is the GTK2-based text editor for Linux and *BSD.

developer Developer: SourceForge.net
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Linux, BSD


PHP UTF-8 is a UTF-8 aware library of functions mirroring PHP's own string functions.

developer Developer: SourceForge.net
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


The doctester extracts code from stdin and tests it using the doctest module in the standard library.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This script uses string.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


The Data Generator is a free, GNU-licensed, open source script written in JavaScript, PHP and MySQL that lets you quickly generate large volumes of custom data in a variety of formats for use in testing software and populating databases.

developer Developer: Benjamin Keen
license License: GNU General Public License (GPL)
operating systems Operating System: All


Converting Word documents to text script allows you to convert word documents to text files.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This script is useful when you want to access portions of a string.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris