Re: Bloquear archivo

Oswaldo Hernández <[email protected]>
Newsgroups gmane.comp.python.general.castellano
Message-ID <[email protected]>
Chema Cortes escribió:
>...
> 
> Aquí tienes una forma de hacerlo:
> http://mail.python.org/pipermail/python-list/2004-December/298174.html

Hola Chema.
Ya andaba mirando el win32, pero la funcion CrateFile() me tenia un poco confundido.

Finalmente parece que de esta forma funciona para lo que  necesito:

 >>> file = 'c:\\temp\\test.mdb'
 >>> f = win32file.CreateFile(file, win32con.GENERIC_ALL, 0, None, win32con.OPEN_EXISTING, 
win32con.FILE_ATTRIBUTE_NORMAL, 0)
Traceback (most recent call last):
   File "<input>", line 1, in <module>
error: (32, 'CreateFile', 'El proceso no tiene acceso al archivo porque est\xe1 siendo utilizado por 
otro proceso.')

Gracias.

-- 
*****************************************
Oswaldo Hernández
oswaldo (@) soft-com (.) es
*****************************************
PD:
Antes de imprimir este mensaje, asegúrese de que es necesario.
El medio ambiente está en nuestra mano.
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.