Python Script Cannot Write to Directory

News123 news1234 at free.fr
Thu Aug 5 09:49:20 CEST 2010


On 08/04/2010 09:27 AM, Chris Rebert wrote:
> On Wed, Aug 4, 2010 at 12:21 AM, News123 <news1234 at free.fr> wrote:
> <snip>
>> 3.) try following python
>>
>> import os
>> print os.getcwd()
>> import shutil
>> shutil("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME")
> 
> WTF; modules aren't callable. Typo?
> 

Indeed. This is a typo and Matteo Landi's right about what I meant:
shutil.copyfile("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME")


What remains is:

I think the answers to my questions will help to reveal the cause of the
problem.


The original question lacks necessary information
as file permissions / directory permissions etc. / the exact error message.





More information about the Python-list mailing list