Python Script Cannot Write to Directory

Matteo Landi landimatte at gmail.com
Wed Aug 4 10:20:50 CEST 2010


On Wed, Aug 4, 2010 at 9:27 AM, Chris Rebert <clp2 at rebertia.com> 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?

I suppose he/she would have written:

shutil.copyfile("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME")

Cheers.

>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Matteo Landi
http://www.matteolandi.net/



More information about the Python-list mailing list