Issue2034

classification
Title: shutil.copy doesn't work
Type: behaviour Severity: normal
Components: Core, Library Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pfotus, santa4nt, zyasoft
Priority: normal Keywords:

Created on 2013-03-24.11:42:52 by pfotus, last changed 2014-07-01.04:05:11 by zyasoft.

Files
File name Uploaded Description Edit Remove
fiot.py pfotus, 2013-03-24.11:42:52 called by "C:\Program Files (x86)\Java\jre7\bin\java.exe" -Dpython.home=C:\TEMP\ActivePython -cp C:\TEMP\ActivePython\jython-standalone-2.7-b1.jar org.python.util.jython fiot.py
fiot.py santa4nt, 2013-03-24.19:51:06 minimal repro
Messages
msg7976 (view) Author: Seknicka (pfotus) Date: 2013-03-24.11:42:52
I wrote a little program for test speed of file-i/o
now I'm facing, that

 shutil.copy 

doesn't work in jython 2.7 with JRE 1.6 and JRE 1.7 on Windows7.
I attatched my test-program fiot.py which is working fine 
with python 2.7 and iron-python and activePython

best regards
Josef
msg7977 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-03-24.19:51:06
It seems that you are trying to copy a (temp) file to a non-existing directory, C:\Temp\?

Here's a minimal script that I think he's having problems with.

Without C:\Temp\ present:

C:\Users\Santoso\Code>java -cp jython-standalone-2.7-b1.jar org.python.util.jyth
on fiot.py
Traceback (most recent call last):
  File "fiot.py", line 9, in <module>
    shutil.copy(src, 'C:\\Temp\\test.copy')
  File "C:\Users\Santoso\Code\jython-standalone-2.7-b1.jar\Lib\shutil.py", line
117, in copy
  File "C:\Users\Santoso\Code\jython-standalone-2.7-b1.jar\Lib\shutil.py", line
71, in copyfile
IOError: [Errno 13] Permission denied: 'C:\\Temp\\test.copy'


With C:\Temp\ present your script works fine.
msg8705 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.04:57:24
Is this an actual bug?

We simply use the standard CPython shutil module. Note that it is possible to see problems if your security manager does not allow full posix support.
msg8813 (view) Author: Jim Baker (zyasoft) Date: 2014-06-24.18:21:40
Starting to close out this bug as WFM
History
Date User Action Args
2014-07-01 04:05:11zyasoftsetstatus: pending -> closed
2014-06-24 18:21:40zyasoftsetstatus: open -> pending
resolution: remind -> works for me
messages: + msg8813
2014-06-19 04:57:24zyasoftsetresolution: remind
messages: + msg8705
nosy: + zyasoft
2013-03-25 23:03:05fwierzbickisetpriority: normal
nosy: + fwierzbicki
2013-03-24 19:51:06santa4ntsetfiles: + fiot.py
nosy: + santa4nt
messages: + msg7977
2013-03-24 11:42:52pfotuscreate