rofunc.utils.oslab.file_process#

1.  Module Contents#

1.1.  Functions#

delete_lines

Delete the appointed lines in the file.

1.2.  API#

rofunc.utils.oslab.file_process.delete_lines(in_path, out_path, head, tail=0)[source]#

Delete the appointed lines in the file.

Parameters:
  • in_path – the input file path.

  • out_path – the output file path.

  • head – number of lines to be deleted from the head of the file.

  • tail – number of lines to be deleted from the tail of the file.

Returns: