I convert my python code to c by cython and after that compile .c file and use .so in my project.
My problem:
I use __file__
in my python code and in while compile by gcc, it doesn't get error. but when I run program and import .so in other python files, appear an error from __file__
line.
How can solve this problem? Is there any method to replace with __file__
?