Home - cassiobj/PCM-Python_lib GitHub Wiki
PCM-Python is a Python 2.7 extension for Oracle BRM 7.5, provided as a shared object file (PCMPy.so). This extension allows Python applications to interact with the Oracle BRM system efficiently.
- Python 2.7: Ensure that Python 2.7 is installed on your system.
- PCM Lib: Ensure that the PCM library from Oracle BRM 7.5 is installed on your system.
Download the PCMPy.so file from the provided source or repository.
You have two options for placing the PCMPy.so file:
- Option A: Place in Project Directory
mv PCMPy.so /path/to/your/project/
- Option B: Place in Python's Default Library Directory
import site print(site.getsitepackages())
Move the PCMPy.so file to one of the directories listed:
mv PCMPy.so /path/to/python/lib/directory/
Create a simple Python script to verify that the extension is loaded correctly:
import os
import sys
# Add the directory containing PCMPy.so to the system path if necessary
sys.path.append('/path/to/your/project/') # Only needed if using Option A
try:
import PCMPy
print("PCM-Python extension loaded successfully.")
except ImportError:
print("Failed to load the PCM-Python extension.")
Run the script:
python verify_pcm_py.py
If the extension is loaded successfully, you should see the message "PCM-Python extension loaded successfully."
You can now use the PCM-Python extension in your Python scripts. For example:
import PCMPy
# Attempt to connect to the Context Manager
result = PCMPy.connect_cm()
if result:
print("Connection established successfully!")
else:
print("Failed to establish connection.")
- ImportError: If you encounter an ImportError, ensure that the directory containing PCMPy.so is included in your PYTHONPATH, or place the file in Python's default library directory.
- Compatibility Issues: Verify that you are using Python 2.7 and Oracle BRM 7.5. Compatibility with other versions is not guaranteed.
For further assistance, please refer to the official documentation or contact support at [email protected].
Tested on Oracle Linux 7.9. This version of PCMPy.so is compiled for X86 processors.
© 2024 Cássio B. Jemael. All rights reserved.