Re: os.unlink on Windows

2010-08-09 Thread Lawrence D'Oliveiro
In message , Shambhu wrote: > It is working now after using double backslash in pathname. Might be simpler to use slashes. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.unlink on Windows

2010-08-08 Thread Shambhu
Hi Thomas, Steven, Thanks for explanation. It is working now after using double backslash in pathname. I was misinterpreting the display output and thinking that it was being added by 'os' module. Regards, Shambhu. T On Aug 8, 6:29 pm, Steven D'Aprano wrote

Re: os.unlink on Windows

2010-08-08 Thread Steven D'Aprano
On Sun, 08 Aug 2010 04:41:14 -0700, Shambhu wrote: > Hi Thomas, > >I checked, file is present. Here is my sample script: > import os > filename = "C:\SHAMBHU\tmp\text_delete.txt" Did you intend to provide a filename with two TAB characters in it? c colon backslash s h a m b u TAB m

Re: os.unlink on Windows

2010-08-08 Thread Thomas Jollans
On 08/08/2010 01:41 PM, Shambhu wrote: > Hi Thomas, > >I checked, file is present. Here is my sample script: > import os > filename = "C:\SHAMBHU\tmp\text_delete.txt" > os.unlink(filename) > > File "C:\SHAMBHU\tmp\text_delete.txt" is accessible but "C:\\SHAMBHU\ > \tmp\\text_delete.tx

Re: os.unlink on Windows

2010-08-08 Thread Shambhu
Hi Thomas, I checked, file is present. Here is my sample script: import os filename = "C:\SHAMBHU\tmp\text_delete.txt" os.unlink(filename) File "C:\SHAMBHU\tmp\text_delete.txt" is accessible but "C:\\SHAMBHU\ \tmp\\text_delete.txt" is not (with extra backslash in path which is added by

Re: os.unlink on Windows

2010-08-07 Thread Thomas Jollans
On 08/07/2010 01:10 PM, Shambhu Sharma wrote: > Hi, > > I am new to Python. I was trying to use os.unlink function in > windows. But i am getting error: > OSError: [Errno 2] No such file or directory: > 'C:\\SHAMBHU\\tmp\\text_delete.txt' > > Input file to os.unlink is: 'C:\SHAMBHU\tmp\te

os.unlink on Windows

2010-08-07 Thread Shambhu Sharma
Hi, I am new to Python. I was trying to use os.unlink function in windows. But i am getting error: OSError: [Errno 2] No such file or directory: 'C:\\SHAMBHU\\tmp\\text_delete.txt' Input file to os.unlink is: 'C:\SHAMBHU\tmp\text_delete.txt'. But os.unlink is adding extra backslash with p