VJ wrote: > Hi All > > Basically i want to write into a file .If the permissions are not there > then print a error message. > How do i achive this ??? > > Thanks, > VJ >
One way would be a try-except block, and leave the permission checking error message generation, etc. to the operating system. try: outfile = file(outfilename,"w") except IOError, errormsg print "Could not write to file %s: %s" % (outfilename, errormsg) -- http://mail.python.org/mailman/listinfo/python-list