FreeBSD Jails & Python

The Python interface for jail_get() system
call
has been added to the existing
devel/py-freebsd port
and the purpose of this Python interface is to allow you to get jail’s
parameters like the JID, hostname, IP address, etc.

For now the jail_get() Python interface is only available from the
Github repository listed below, but hopefully soon enough it will be
added to the FreeBSD Ports Collection as well.

Okay, that’s all good, but can we do more with it? Sure, we can now
write a simple jls(8)-like Python function that displays information
about our FreeBSD jails. The script below works in a similar way to
jls(8) and displays information about our jails: