9. Scripting

9.1. Python Scripting

9.1.1. Config

The python scripts have the purposes to take the log files and then transform them into the pre-defined formats delimiter-separated files. The configuration file contains only one line showing all the attributes there are in the log file. Each line has the format of a sequence of the couple key|key_name:

**Config File for ATC**

DD|Date|ATT|Time|AMM|Server|APN|Product|ATY|Query_Type|AQM|Query_Name|AST|Status|ACM|Canned_message_number|...

meaning the ATC log file will have these key: DD, ATT, AMM...and the DD key attribute will bear the name of Date while ATT means Time and so on...

The name of the config file must follow the rule: productName _config

9.1.2. Scripting

The scripts are stored in 2 files csvio.py & csv_build.py both of which share the same directory with the one that contains the configuration files.

 +csvio.py
 +csv_build.py
- cfgs
   +ATC_config.cfg
   +DAS_config.cfg

9.1.2.1. Code listing

Project Versions

Table Of Contents

Previous topic

8. Django

Next topic

10. Authentication & Authorization