Re: Why Can't I Delete a File I Created with Win XP?

2009-12-07 Thread John Machin
On Dec 5, 9:57 pm, W. eWatson wolftra...@invalid.com wrote: [snip]          s = self.current_path s referred to something ...          s = Analysis but now s refers to Analysis ... at best, there is redundant confusing code; at worst, the source of your problem.          s =

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-06 Thread Hans Mulder
J wrote: But that being said, this brings to mind a question about this... in *nix, when I can't do something like delete a file or directory, or unmount a filesystem and cant find the cause, I can do an lsof and grep for references to the file/directory in question, then work from there to

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-06 Thread Dave Angel
Hans Mulder wrote: div class=moz-text-flowed style=font-family: -moz-fixedJ wrote: But that being said, this brings to mind a question about this... in *nix, when I can't do something like delete a file or directory, or unmount a filesystem and cant find the cause, I can do an lsof and grep

Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread W. eWatson
I'm trying to store analytic data in a folder called Analysis. If the user doesn't have the folder, I make one for him, and then write a txt file into it. In this case a histogram of values, x and frequency. However, it appears that I made a mistake somewhere and cannot delete it using the Win

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread anand jeyahar
simple when the python program ended, the file handle created by it was still open... so windows will not allow you to delete it (the standard behaviour, when a parent process dies, with a sub-process running is to keep the child running.) try logging off and back on.it will solve the

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread W. eWatson
The program code is not mine, but I wanted to modify it to produce an Analysis folder when the user wants histogram file, basically, a txt file to appear in Analysis. Elsewhere in the program this is done for another type of data that is directed to an Events folder. I figured I could copy

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread John Machin
On Dec 6, 2:46 am, W. eWatson wolftra...@invalid.com wrote: [snip]          f = file( s, wb )          if not f:              self.LogError( File creation error 1 )              return False Either you are shadowing the built-in function file() or you haven't tested this code ... file() aka

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread J
On Sat, Dec 5, 2009 at 17:42, John Machin sjmac...@lexicon.net wrote: On Dec 6, 2:46 am, W. eWatson wolftra...@invalid.com wrote: However, even at that, why can't I delete this empty file called Analysis? Are you trying to delete the file from another command window while Python is paused at

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread J
On Sat, Dec 5, 2009 at 20:32, J dreadpiratej...@gmail.com wrote: connections eventually.  So being able to find who has a lock on a given file or directory if the program dies unexpectedly would be useful. Google tells me that the program Process Explorer from SysInternals will provide most

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread W. eWatson
J wrote: On Sat, Dec 5, 2009 at 20:32, J dreadpiratej...@gmail.com wrote: connections eventually. So being able to find who has a lock on a given file or directory if the program dies unexpectedly would be useful. Google tells me that the program Process Explorer from SysInternals will

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread W. eWatson
The original program and code are not mine. I have no idea if that specific piece of code has ever been tested. Generally the program works quite well, and when needed creates the Events folder without any difficulty. That folder is used heavily by writing new data files to it thousands of

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread Stephen Hansen
On Sat, Dec 5, 2009 at 6:20 PM, W. eWatson wolftra...@invalid.com wrote: I'm trying to do a very simple thing. I go to the Analysis folder, and try to use Win XP Pro to delete the empty and unnamed file in it. One just does a right-click on the empty file, and then uses Delete. It won't let me

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread W. eWatson
J wrote: On Sat, Dec 5, 2009 at 21:14, W. eWatson wolftra...@invalid.com wrote: What I'm trying to do is really simple. In the Win XP NG, I have two suggestions to get rid of the Analysis folder and the empty file in it. One is to use a program like you suggested, and the other is to delete it

Re: Why Can't I Delete a File I Created with Win XP?

2009-12-05 Thread J
On Sat, Dec 5, 2009 at 23:17, W. eWatson wolftra...@invalid.com wrote: J wrote: And those are your only options, really.  From what I've been able to see, there is no native ability in Linux to actually see who has a lock on a file that's been opened.  And I completely understand your