Geekguy09
Geekguy09

Reputation: 11

I am generating images that will be continuously into a folder as an output. My goal is to change the output location to another computer

I am working on some python code and I am generating images that will be continuously into a folder as an output. My goal is to change the output location to a folder on another computer and be able to add images into it using a python script.

Upvotes: 0

Views: 28

Answers (2)

Jack Casey
Jack Casey

Reputation: 1856

Is the remote computer accessible over SMB? In that case, you should be able to open it with something like the following:

open("//Server/Folder/AnotherFolder/Writeme.txt", "w")

Upvotes: 1

gahooa
gahooa

Reputation: 137292

This is less of a programming question than a system architecure question, but I will give you some ideas:

  1. Use Amazon S3 and the boto3 library for python. One line of code and you will have the images uploaded to Amazon S3 for use anywhere.

  2. Setup SSH keys between the systems and use subprocess to initiate an scp call to copy the image.

  3. Setup a network share so you have a local path on the original computer that can write to the other.


Despite how great python is, you can't just put stuff on other computers without a agreed upon protocol, server, and/or network setup.

I recommend you use a cloud provider like Amazon S3.

Upvotes: 0

Related Questions