Hi Am working on Sikuli. I need to copy the image which i captured in Sikuli to my Local Desktop or any folder. What is the procedure or command ?

Asked by vijayvinayagam

Hi Am working on Sikuli. I need to copy the image which i captured in Sikuli to my Local Desktop or any folder. What is the procedure or command ?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

import os
import shutil
tgtdir = "path-to-your-target-image-folder"
srcdir = getBundlePath()

img = "some-captured-image.png"

shutil.copy(os.path.join(srcdir, img), tgtdir) # same name

or

shutil.copy(os.path.join(srcdir, img), os.path.join(tgtdir, "new-name.png") # new name

Can you help with this problem?

Provide an answer of your own, or ask vijayvinayagam for more information if necessary.

To post a message you must log in.