On 10/12/06, Asrarahmed Kadri <[EMAIL PROTECTED]> wrote:

Hello,
 
Sorry, but this is a very basic questions...
Can you tell me how to check the existence of a file..

    to check if a file exists, you can use os.path.exists(path)
    or look at http://python.org/doc/current/lib/module-os.path.html for more info
 

Also if a file exists, and we open it in a write mode, it would be truncated to zero length. So what is the way out of this??#
 
Regards,
 
Asrar
--
To HIM you shall return.

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor



_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to