On Feb 25, 9:55 am, Christian Heimes <li...@cheimes.de> wrote: > venutaurus...@gmail.com schrieb: > > > Hello, > > I am facing problems while using os.system() of python for > > copying a file from source to destination where the file name is in > > unicode (multi lingual characters).My python interpreter is trying to > > convert them to ascii and is failing. I tried giving unicode string as > > input for the function something like: > > > c = u"copy "+"\""+full_path+"\" "+dest > > os.system (c) > > First of all do not use os.system() to run external programs. You'll get > in all sorts of trouble like quoting. You are far better of with the > subprocess module. > > Second, why are you using an external program at all? The shutil module > contains multiple functions to copy a file or directory. > > import shutil > shutil.copy(source, dest) > > Christian
Thanks Christian for your reply,will definitely try. -- http://mail.python.org/mailman/listinfo/python-list