← Back to team overview

sikuli-driver team mailing list archive

[Question #270859]: Copy File

 

New question #270859 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270859

1.1.0(2015-08-20_01:00nightly)/Mac10.10.5/Java8(64)1.8.0_25-b17
import os
import shutil
some_path = "/Users/Jeff/Desktop/SikuliScripts/Revenge_Log/"
some_filename = "Revenge_Player_Temp_1.png"
some_other_filename = "Revenge_Player_1.png"
print some_path
print some_filename
print some_other_filename
print some_path+some_filename
print os.path.join(some_path, some_filename)
if os.path.join(some_path, some_filename) == some_path+some_filename:
    print "Yes"
in = os.path.join(some_path, some_filename)
#out = os.path.join(some_path, some_other_filename)
#shutil.copy(in, out)


Result :-
[error] SyntaxError ( "mismatched input 'in' expecting EOF", )
if I rem out the in :-
Revenge_Player_Temp_1.png
Revenge_Player_1.png
/Users/Jeff/Desktop/SikuliScripts/Revenge_Log/Revenge_Player_Temp_1.png
/Users/Jeff/Desktop/SikuliScripts/Revenge_Log/Revenge_Player_Temp_1.png
Yes

if using console I ls - lisa /Users/Jeff/Desktop/SikuliScripts/Revenge_Log/Revenge_Player_Temp_1.png :-

ls -lisa /Users/Jeff/Desktop/SikuliScripts/Revenge_Log/Revenge_Player_Temp_1.png
1953022403 8 -rw-r--r--  1 Jeff  staff  121 28 Aug 10:34 /Users/Jeff/Desktop/SikuliScripts/Revenge_Log/Revenge_Player_Temp_1.png


So the file exists

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.