I'm trying to call a bash function that I've defined in my .profile from a python program. For context, my function calls chef's knife command like so:
function knife-LHR() {
knife $@ -c ~/.chef-LHR/knife.rb
}
If you're wondering why I don't just incorporate the function's logic into my python program, its because my users define this function in their bash profiles and my intent is to support their usage of (in this case) the knife command.
How can I accomplish this using python subprocess?