Re: Check file is locked?

2009-07-13 Thread Lawrence D'Oliveiro
In message 652cca82-44a3-473f-b640- c2336a9cf...@v15g2000prn.googlegroups.com, Rajat wrote: ... my whole idea is to close the wordpad / notepad application so that I can delete the file and the directory where this file resides. Don't you think the user might have that application open for a

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 8, 12:45 pm, Tim Golden m...@timgolden.me.uk wrote: Rajat wrote: On Jul 8, 4:57 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message mailman.2795.1246997268.8015.python-l...@python.org, Christian Heimes wrote: By the way most operating systems don't lock

Re: Check file is locked?

2009-07-09 Thread Tim Golden
Rajat wrote: I've used the Handle.exe and got the following results: -- notepad.exe pid: 3540 COMP\rajatd C: File (RW-) C:\Documents and Settings\rajatd\Desktop 10: File (RW-)

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 9, 1:21 pm, Tim Golden m...@timgolden.me.uk wrote: Rajat wrote: I've used the Handle.exe and got the following results: ---­--- notepad.exe pid: 3540 COMP\rajatd     C: File  (RW-)   C:\Documents and

Re: Check file is locked?

2009-07-09 Thread Tim Golden
Rajat wrote: The Notepad process information is fine here. However, with wordpad the results are not much differentiating: -- wordpad.exe pid: 2832 COMP\rajatd 1C: File (RW-)

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 9, 3:21 pm, Tim Golden m...@timgolden.me.uk wrote: Rajat wrote: The Notepad process information is fine here. However, with wordpad the results are not much differentiating: ---­--- wordpad.exe pid: 2832

Re: Check file is locked?

2009-07-09 Thread Gabriel Genellina
En Thu, 09 Jul 2009 07:53:29 -0300, Rajat rajat.dud...@gmail.com escribió: Thanks Tim for the details. Just further on this, my whole idea is to close the wordpad / notepad application so that I can delete the file and the directory where this file resides. With notepad it is no more a

Re: Check file is locked?

2009-07-08 Thread Tim Golden
Rajat wrote: On Jul 8, 4:57 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message mailman.2795.1246997268.8015.python-l...@python.org, Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed.

Re: Re: Check file is locked?

2009-07-08 Thread Dave Angel
Rajat wrote: On Jul 8, 4:57 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message mailman.2795.1246997268.8015.python-l...@python.org, Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even

Re: Check file is locked?

2009-07-08 Thread Steven D'Aprano
On Wed, 08 Jul 2009 00:06:11 -0700, Dennis Lee Bieber wrote: Also, some applications may still have the file open, but Windows allows one to make copies of that file... Not always though... some applications open files for exclusive read access. -- Steven --

Re: Check file is locked?

2009-07-08 Thread Nobody
On Tue, 07 Jul 2009 21:31:12 -0700, Rajat wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. The general conclusion seems to be that mandatory locking is more trouble than it's worth. My OS is a windows XP sp3. All I'm

Check file is locked?

2009-07-07 Thread dudeja . rajat
How to check if a particular file is locked by some application? (i.e. the file is opened by some application)? -- Regrads, Rajat -- http://mail.python.org/mailman/listinfo/python-list

Re: Check file is locked?

2009-07-07 Thread Christian Heimes
dudeja.ra...@gmail.com wrote: How to check if a particular file is locked by some application? (i.e. the file is opened by some application)? It depends on your operating system. By the way most operating systems don't lock a file when it's opened for reading or writing or even executed.

Re: Check file is locked?

2009-07-07 Thread Lawrence D'Oliveiro
In message mailman.2795.1246997268.8015.python-l...@python.org, Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. The general conclusion seems to be that mandatory locking is more trouble than it's worth. --

Re: Check file is locked?

2009-07-07 Thread Rajat
On Jul 8, 4:57 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message mailman.2795.1246997268.8015.python-l...@python.org, Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. The

Re: Check file is

2008-12-22 Thread Colin J. Williams
gardsted wrote: Harish wrote: Hi Friends Is there any utility in python which will help me to read any pdf files? Regards Harish Not sure, what you're after exactly, but I tried googling 'python read pdf' and found this, so maybe 'reportlab' is what you're looking for: Re: Reading PDF files

Re: Check file is

2008-12-22 Thread Paul McNett
Colin J. Williams wrote: The ReportLab toolkit appears to be concerned with building Portable Document Files. I would be interested in any utility which will read any pdf - for example, to convert pdf - html I don't know of any Python utility to do this, but pdftohtml, pdftotext, pdftoppm,

Re: Check file is

2008-12-22 Thread Colin J. Williams
Paul McNett wrote: Colin J. Williams wrote: The ReportLab toolkit appears to be concerned with building Portable Document Files.  I would be interested in any utility which will read any pdf - for example, to convert pdf - html I don't know of any Python utility to

Re: Check file is

2008-12-22 Thread Grant Edwards
On 2008-12-20, Harish harish.bha...@gmail.com wrote: Is there any utility in python which will help me to read any pdf files? There are two things I can think off the top of my head 1) The Poppler library. I don't know if there's a Python binding for it. The poppler home page and

Check file is

2008-12-20 Thread Harish
Hi Friends Is there any utility in python which will help me to read any pdf files? Regards Harish -- http://mail.python.org/mailman/listinfo/python-list

Re: Check file is

2008-12-20 Thread Banibrata Dutta
AFAI can tell... (from a quick google search), there is only a commercial product that can read PDF... i.e. PageCatcher from ReportLabs.http://www.reportlab.org/devfaq.html (look at item 2.1.5) http://www.reportlab.org/devfaq.html BTW, an apparently, non platform-neutral way may be described

Re: Check file is

2008-12-20 Thread gardsted
Harish wrote: Hi Friends Is there any utility in python which will help me to read any pdf files? Regards Harish Not sure, what you're after exactly, but I tried googling 'python read pdf' and found this, so maybe 'reportlab' is what you're looking for: Re: Reading PDF files #2 Dec 20th,

Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Hello Chaps, I've got a requirement to check a file for a change every 10 seconds or so, and if the file has been modified since the last time I parsed its content into the application then I need to parse it in again. However, I need this process to not interrupt the rest of my application

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Gabriel Genellina
En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue [EMAIL PROTECTED] escribi�: I've got a requirement to check a file for a change every 10 seconds or so, and if the file has been modified since the last time I parsed its content into the application then I need to parse

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Tim Golden
Gabriel Genellina wrote: En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue [EMAIL PROTECTED] escribi�: I've got a requirement to check a file for a change every 10 seconds or so, and if the file has been modified since the last time I parsed its content into the

RE: Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Genellina Sent: 22 October 2007 15:29 To: python-list@python.org Subject: Re: Check File Change Every 10 Seconds En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue [EMAIL PROTECTED] escribi�: I've

RE: Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Spot on Tim, I'm running Linux, I totally forgot to mention... more detail coming in a reply to Gabriel's post. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden Sent: 22 October 2007 15:40 Cc: python-list@python.org Subject: Re: Check File

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Marco Mariani
Robert Rawlins - Think Blue wrote: That certainly looks to be the type of thing that I'm looking to achieve, however, I forgot to mention I'm running this on a Linux platform and not a Win32 one :-( Sorry. Did you try python-gamin? Gamin is a file and directory monitoring system defined to

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Gabriel Genellina
En Mon, 22 Oct 2007 11:45:49 -0300, Robert Rawlins - Think Blue [EMAIL PROTECTED] escribi�: Thanks for your time Gabriel, That certainly looks to be the type of thing that I'm looking to achieve, however, I forgot to mention I'm running this on a Linux platform and not a Win32 one :-(

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Paul Rudin
Marco Mariani [EMAIL PROTECTED] writes: Robert Rawlins - Think Blue wrote: That certainly looks to be the type of thing that I'm looking to achieve, however, I forgot to mention I'm running this on a Linux platform and not a Win32 one :-( Sorry. Did you try python-gamin? Gamin is a

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Tommy Nordgren
On 22 okt 2007, at 16.45, Robert Rawlins - Think Blue wrote: Thanks for your time Gabriel, That certainly looks to be the type of thing that I'm looking to achieve, however, I forgot to mention I'm running this on a Linux platform and not a Win32 one :-( Sorry. I'm sure similar things

Re: Check File Change Every 10 Seconds

2007-10-22 Thread Paul Rubin
Robert Rawlins - Think Blue [EMAIL PROTECTED] writes: That certainly looks to be the type of thing that I'm looking to achieve, however, I forgot to mention I'm running this on a Linux platform and not a Win32 one :-( Sorry. If it's just one file, then yes, stat it in a loop with os.sleep. If

distutils - script install check file existence before copy?

2007-03-03 Thread [EMAIL PROTECTED]
Not sure if it is possible to do this - I know distutils has force option that can be turned on/off for install_data, but is it possible to do something somewhat complicated - have a data file named YYY, need to copy it to share/script/YYY only if share/script/YYY does not already exist,