steve+comp.lang.python at pearwood.info
Sat Feb 19 07:38:40 CET 2011
On Fri, 18 Feb 2011 22:13:42 -0800, ecu_jon wrote:
> ok changed the try/except to just a file copy and got this:
> sourcepath is :
Note that it's a list.
Note that you are calling copy2 with the first argument as a list.
> TypeError: coercing to Unicode: need string or buffer, list found
Note that the error tells you exactly what is wrong.
> yes i see the list.
> but shouldnt this "for files in sourcepath:" parse thru the list ... ?
Yes it does. So what? You don't use files, you use sourcepath each time.
>>> source = ['a', 'bb', 'ccc']
>>> for x in source:
More information about the Python-list