当前位置: 动力学知识库 > 问答 > 编程问答 >

python - Can Fabric "put" remote files from local memory-buffer?

问题描述:

The usual way of updating a remote file with Fabric is by invoking put with the local version of the file as argument.

However, in my case, the new version of the file exists only in memory -- writing it out into a temporary local file (while also making sure to use a unique name for it and arranging for it to be removed at the end) seems both tedious and wasteful.

Can put be fed an existing string/blob with data to put out verbatim? Is there some other put-like operation, that can do it?

分享给朋友:
您可能感兴趣的文章:
随机阅读: