diff --git a/deeputil/misc.py b/deeputil/misc.py
index <HASH>..<HASH> 100644
--- a/deeputil/misc.py
+++ b/deeputil/misc.py
@@ -489,19 +489,21 @@ class ExpiringCounter(object):
 
 
 # TODO Examples and Readme.md
-import resource
-
 
 def set_file_limits(n):
     """
     Set the limit on number of file descriptors
-    that this process can open.
+    that this process can open. Only works on posix systems.
 
     """
-
+    
     try:
-        resource.setrlimit(resource.RLIMIT_NOFILE, (n, n))
-        return True
+        if os.name == "posix":
+            # The resource module only exists on posix systems
+            resource.setrlimit(resource.RLIMIT_NOFILE, (n, n))
+            return True
+        else:
+            return False
     except ValueError:
         return False
importing the resouce module is not portable to Windows systems. The import was moved inside a check of what system type is on. Also moved inside the function to reduce memory ussage if that specific function in the library isn't being used.