Package osh :: Package command :: Module gen
[frames] | no frames]

Module gen

source code

gen [-p PAD] [COUNT [START]]

Generate a sequence of COUNT integers, starting at START. If START is not specified, then the sequence starts at 0. If no arguments are specified, then the sequence starts at 0 and does not terminate.

If the -p flag is specified, then the generated integers are converted to strings and left padded so that each string contains PAD characters. len(str(COUNT + START)) must not exceed PAD.

Functions
 
gen(count=None, start=0, pad=None)
Generate a sequence of count integers, starting at start.
source code
Function Details

gen(count=None, start=0, pad=None)

source code 

Generate a sequence of count integers, starting at start. If no arguments are provided then the sequence starts at 0 and does not terminate. If pad is specified, and is an integer, then the output values are strings, padded to the specified length. The length of the generated strings must not exceed pad.