Reputation: 36556
I am attempting to pass a bash environment variable back into my fabric function like this:-
from fabric.api import env
def env_localhost():
"All the environment variables relating to your localhost"
project_home = local('echo $PROJECT_HOME')
print 111, project_home
But it doesn't seem to be able to retrieve the stdout results and assign it to my python project_home
variable. What's the correct way to do this right?
Upvotes: 5
Views: 1012