python API: add cmd_sent flag to shutdown only subscribed chains
fixed env python