Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lintel support with python 2.x? #21

Open
aurooj opened this issue Oct 8, 2018 · 2 comments
Open

Lintel support with python 2.x? #21

aurooj opened this issue Oct 8, 2018 · 2 comments

Comments

@aurooj
Copy link

aurooj commented Oct 8, 2018

Hi,
As per your comment below:
To use Python 2, I believe a (potentially small) amount of code would have to be changed in lintel/py_ext/lintelmodule.c.

Can you please help what change is need to be made in the lintelmodule.c file for python2?

@dukebw
Copy link
Owner

dukebw commented Oct 8, 2018

Hi aurooj, I believe the major part that needs changing is the C extension module initialization:

PyMODINIT_FUNC
PyInit__lintel(void)
{
av_register_all();
av_log_set_level(AV_LOG_ERROR);
srand(time(NULL));
return PyModuleDef_Init(&lintelmodule);
}

This can be converted by following the guide here: https://docs.python.org/2/extending/extending.html. Any other inconsistencies between the Python 2 and 3 C extension APIs would need to be changed as well. This article: https://docs.python.org/3/howto/cporting.html might be useful.

@jugg1024
Copy link

jugg1024 commented Aug 1, 2019

Hi, any progress here? Could you please offer example codes of lintelmodule.c for python 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants