Project Description:

C API functions are used in PSS®E modules for Python 2.7. After the Python 3 update, some code written in Python 2 are incompatible with the new Python 3 environment. However, Siemens PTI intends to support either version of Python. Some codes have to modify or rewrite. This project focuses these updates and tests.

There is already a list of solutions. But those untested codes are not 100% reliable. There are total 10 Python C APIs. We have to:

  1. Develop a function to demonstrate usage of each API.
  2. Test the code thoroughly.
  3. Convert the function to a multi-python version using the given solutions.
  4. Test the multi-python version in both Python 2.7 and Python 3.2.
  5. Develop a demonstration script in Python that someone else can run to verify the correctness of the code.

We have to write up a document describing each function in each module and what it is supposed to do. Also, we have to add descriptions as doc strings to each function and verify that they can be seen correctly through the help function. In the end, we need to write a brief summary of why the test coverage is complete.

Project Environment: Microsoft Visual Studio 2008, Python 3.2, Python 2.7

Project Length: 3 Weeks

Project Result:

All ten C API functions are sufficiently demonstrated and tested. Required descriptions, documents, and summary are finished and handed to the manager.

Lessons Learnt:

I was not familiar with C language. But this project required some programming in C. So, during this project, I learned a lot of knowledge in C programming language, memory related stuff, and pointer, including PyObject, DECREF, Malloc, etc.

Also, my programming skill in Python improved because we needed to test the API, which required Python programming.