Re: very strange syntax errors

2007-03-28 Thread David Nicolson
This might be stating the obvious, but have you detabbed your text, if you are using spaces? On 28/03/2007, at 8:18 PM, hg wrote: > hg wrote: > >> Hi, >> >> I'v been facing some very strange errors lately: >> >> one example: >> >> def __init__(self): >> >> import my_info >>

Re: shutil.copy Problem

2007-03-28 Thread David Nicolson
;Copying ",repr(xmlfile),"..." > > shutil.copy(xmlfile,"C:\iTunes Music Library.xml") The shutil line needed to be changed to this to be successful: > shutil.copy(xmlfile.encode("windows-1252"),"C:\iTunes Music > Library.xml" Regards, Davi

Re: shutil.copy Problem

2007-03-26 Thread David Nicolson
Thanks, but it's definitely not the print. In original the code the print statements are replaced by a call to a log method. Besides, the exception would be different if it was thrown outside of the try block. On 27/03/2007, at 2:42 PM, Justin Ezequiel wrote: > On Mar 27, 11:10 a

shutil.copy Problem

2007-03-26 Thread David Nicolson
Hi, I wasn't exactly sure where to send this, I don't know if it is a bug in Python or not. This is rare, but it has occurred a few times and seems to be reproducible for those who experience it. Examine this code: >>> try: >>> shutil.copy("/file.xml","/Volumes/External/file.xml") >>>

win32com.client.GetActiveObject()

2005-09-18 Thread David Nicolson
Hi, I have been successfully using iTunes' COM interface with Python using either of the following lines successfully: iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application") iTunes = win32com.client.Dispatch("iTunes.Application") The only problem is that it will launch iTunes i