从python操作cobol文件
cobutils的Python项目详细描述
cobutils是一个库,用于访问使用cobol格式化的文件的数据 python程序。
该包包括一个可执行文件,用于从cobol文件中提取数据,以及 另一个用于创建包含COBOL格式数据的文件:
$ ./cobextract.py Usage: cobextract.py [OPTIONS] [FILE] Extract cobol sequential data from FILE or standard input cobextract.py: error: Record definition [-r|--reg] is required $ ./cobcreate.py --help Usage: cobcreate.py [OPTIONS] [CSVFILE] Create a cobol sequential data from CSV FILE or standard input Options: -h, --help show this help message and exit -r FILE, --reg=FILE read register from FILE -o FILE, --out=FILE output FILE -q, --quiet don't print status messages to stdout
项目代码和BugTracker托管在 Bitbucket。
安装
使用pip:
pip install cobutils
操作系统下载并使用setup
python setup.py install