Hi,
currently starting Tor from an python application using existing frameworks (such as txtorconn) provide limits related to the capabilities of sandboxing the application itself with AppArmor.
If you want to start Tor from your own application, then you must enable such application to "execute" an external binary called /usr/bin/tor .
I'm wondering if anyone ever tried to start Tor from a Python application using Ctypes, to start the Tor "main()", placing the Tor process into a dedicated Python's application Thread.
That way it would be possible to sandbox the Python application using AppArmor without enabling any kind of execve() call.
Does anyone ever tried this?