You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withSultan.load() ass:
result=s.yum('install', '-y', 'postgresql').run(streaming=True)
whileTrue:
# if full output is needed, read the pipes one last time# after `is_complete == True` to avoid a race conditioncomplete=result.is_completeforlineinresult.stdout:
print(line)
forlineinresult.stderr:
print(line)
ifcomplete:
breaktime.sleep(1)
My question is: how different would this code be if Sultan.load() were replaced with Sultan().
The text was updated successfully, but these errors were encountered:
If you were to use it with the constructor Sultan(), you can pass these contexts in with the context keyword argument, which is a dictionary. Sultan uses these determine the right type of bash command to generate based on the parameters you provide, so using load() is the right way to do it. I didn't document using Sultan() constructor because of this reason, since it is not the recommended way of doing so.
In Streaming Results from a Command we see:
My question is: how different would this code be if
Sultan.load()
were replaced withSultan()
.The text was updated successfully, but these errors were encountered: