--- nt.cs	2007-03-06 12:43:52.391055800 -0800
+++ nt.cs	2007-03-08 15:03:01.158466400 -0800
@@ -39,6 +39,25 @@ namespace IronPython.Modules {
             System.Environment.FailFast("IronPython os.abort");
         }
 
+        [PythonName("access")]
+        public static bool Access(string path, int mode)
+        {
+            FileAttributes attr;
+            try {
+                attr = File.GetAttributes(path);
+            } catch {
+                // The path is either empty, invalid, or non-existent.
+                return false;
+            }
+
+            // F_OK, R_OK, and X_OK are always true as long as the file exists.
+            // So simply check to see if the file is read-only.
+            if ((mode & (int)W_OK) != 0 && ((int)attr & (int)FileAttributes.ReadOnly) != 0)
+                return false;
+
+            return true;
+        }
+
         [PythonName("chdir")]
         public static void ChangeDirectory(string path) {
             if (String.IsNullOrEmpty(path)) throw ExceptionConverter.CreateThrowable(error, "Invalid argument");
@@ -823,6 +842,11 @@ namespace IronPython.Modules {
         // public static object P_OVERLAY = 2;
         // public static object P_DETACH = 4;
 
+        public static object F_OK = 0;
+        public static object X_OK = 1;
+        public static object W_OK = 2;
+        public static object R_OK = 4;
+
         #endregion
 
         #region Private implementation details
