Hello,
I encountered difficulties when I tried to use the auparse module in Python 3.3. I would
like to use this module with a modern version of the interpreter due to severe memory
leaks in my auparse-based script that is run in Python 2.6.6 (which is default for RHEL
6.4). The problem is described here:
http://stackoverflow.com/questions/23369937/python-memory-consumption-on-....
Surely it can be my own fault (cyclic links preventing the gc work or something else), but
some people from Stackoverflow community advised me to use Python 3+ since it works with
dynamic memory more properly. I would like to do it first.
So I tried to import auparse module from the audit-libs-python into the interpreter that
was distributed with the latest version of LibreOffice:
[root@vitaly registration]# yum info audit-libs-python
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use
subscription-manager to register.
Installed Packages
Name : audit-libs-python
Arch : x86_64
Version : 2.2
Release : 2.el6
Size : 267 k
Repo : installed
From repo : repository-204
Summary : Python bindings for
libaudit
URL :
http://people.redhat.com/sgrubb/audit/
License : LGPLv2+
Description : The audit-libs-python package contains the bindings so that libaudit
: and libauparse can be used by python.
[root@vitaly registration]# rpm -q --provides audit-libs-python
_audit.so()(64bit)
auparse.so()(64bit)
audit-libs-python = 2.2-2.el6
audit-libs-python(x86-64) = 2.2-2.el6
[vitaly@vitaly registration]$ /opt/libreoffice4.2/program/python
Python 3.3.3 (default, Jan 28 2014, 10:45:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license"
for more information.
>> import sys
>> sys.path.append('/usr/lib64/python2.6/site-packages/')
>> from auparse import AuParser
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /usr/lib64/python2.6/site-packages/auparse.so: undefined symbol:
_Py_ZeroStruct
>>
I will appreciate if someone could help me to import this module to Python 3.3. Thank you
a lot!
Vitaly Isaev
Software engineer
Information security department
Fintech JSC, Moscow, Russia