KMR
Functions | Variables
kmrfsplit.py File Reference

KMR-Shell File Splitter. More...

Go to the source code of this file.

Functions

def kmrfsplit.getcuttingpoint (ipath, sep, startpos, partsize)
 Caluculate cutting point of file. More...
 
def kmrfsplit.splitfile (nums, sep, odir, opref, infile)
 Split a file using separator string. More...
 
def kmrfsplit.writefile (ipath, opath, startpos, endpos)
 Write part of the inputfile to outputfile. More...
 

Variables

 kmrfsplit.action
 
 kmrfsplit.args
 
 kmrfsplit.default
 
 kmrfsplit.dest
 
 kmrfsplit.help
 
 kmrfsplit.inputfile = args[0]
 
 kmrfsplit.metavar
 
 kmrfsplit.options
 
 kmrfsplit.parser = OptionParser(usage)
 
 kmrfsplit.type
 
string kmrfsplit.usage = "usage: %prog [options] inputfile"
 kmrfsplit main routine. More...
 

Detailed Description

KMR-Shell File Splitter.

Definition in file kmrfsplit.py.

Function Documentation

def kmrfsplit.writefile (   ipath,
  opath,
  startpos,
  endpos 
)

Write part of the inputfile to outputfile.

Parameters
ipathinputfile path.
opathoutputfile path. start position of part. end position of part.

Definition at line 17 of file kmrfsplit.py.

def kmrfsplit.getcuttingpoint (   ipath,
  sep,
  startpos,
  partsize 
)

Caluculate cutting point of file.

Search separator string in proper position of input file and return cutting point of file. If separator string not found, print error message and exit.

Parameters
ipathinput file path.
sepseparator string. (regular expression)
startposstart position of separate.
endposend position of separate.

Definition at line 54 of file kmrfsplit.py.

def kmrfsplit.splitfile (   nums,
  sep,
  odir,
  opref,
  infile 
)

Split a file using separator string.

Parameters
numsnumber of part to split.
sepseparator string. (regular expression)
odiroutput directory of splitted files.
oprefoutput file prefix of splitted files.
infileinput file path.

Definition at line 91 of file kmrfsplit.py.

Variable Documentation

string kmrfsplit.usage = "usage: %prog [options] inputfile"

kmrfsplit main routine.

It works on Python 2.4 or later.

Definition at line 121 of file kmrfsplit.py.