python custom module import
Alan Buxey
alan.buxey at gmail.com
Wed Apr 26 20:07:22 CEST 2017
its just python...you can import etc anything you need....but you need
to ensure that your PYTHONPATH
is correctly populated in the envionrment before FreeRADIUS is run eg
export PYTHONPATH=/usr/local/python4/scripts
ie add such a PATH populator to the startup script...
alan
On 26 April 2017 at 13:54, Sami Jorl via Freeradius-Users
<freeradius-users at lists.freeradius.org> wrote:
> Hi,
> How is it possible to import another python module into example.py file.
>
> When trying to import another module freeradius doesn't start and displays this error:
> python_function_load - Module 'example' not found
> <type 'exceptions.ImportError'> (No module named geoip2.database)
>
> I tried adding module path in /mods-available/python like bellow but it didn't fix issue.
> python_path = ${modconfdir}/${.:name}:/usr/local/lib/python2.7/
>
> Thanks for the help
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list