diff --git a/Makefile.pre.in b/Makefile.pre.in
index dc1d197a8e9..0025307a7a7 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -193,15 +193,16 @@ MODULE_OBJS= \
# Used of signalmodule.o is not available
SIGNAL_OBJS= @SIGNAL_OBJS@
-IO_H= Modules/_iomodule.h
+IO_H= Modules/_io/_iomodule.h
IO_OBJS= \
- Modules/io.o \
- Modules/_iobase.o \
- Modules/_fileio.o \
- Modules/_bufferedio.o \
- Modules/_textio.o \
- Modules/_bytesio.o
+ Modules/_io/_iomodule.o \
+ Modules/_io/iobase.o \
+ Modules/_io/fileio.o \
+ Modules/_io/bufferedio.o \
+ Modules/_io/textio.o \
+ Modules/_io/bytesio.o \
+ Modules/_io/stringio.o
##########################################################################
# Grammar
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index f8d3a838b3d..824b614392a 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -114,7 +114,7 @@ _codecs _codecsmodule.c # access to the builtin codecs and codec registry
_weakref _weakref.c # weak references
# Standard I/O baseline
-_io io.c _iobase.c _fileio.c _bytesio.c _bufferedio.c _textio.c _stringio.c
+_io -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
# The zipimport module is always imported at startup. Having it as a
# builtin module avoids some bootstrapping problems and reduces overhead.
diff --git a/Modules/io.c b/Modules/_io/_iomodule.c
similarity index 100%
rename from Modules/io.c
rename to Modules/_io/_iomodule.c
diff --git a/Modules/_iomodule.h b/Modules/_io/_iomodule.h
similarity index 100%
rename from Modules/_iomodule.h
rename to Modules/_io/_iomodule.h
diff --git a/Modules/_bufferedio.c b/Modules/_io/bufferedio.c
similarity index 100%
rename from Modules/_bufferedio.c
rename to Modules/_io/bufferedio.c
diff --git a/Modules/_bytesio.c b/Modules/_io/bytesio.c
similarity index 100%
rename from Modules/_bytesio.c
rename to Modules/_io/bytesio.c
diff --git a/Modules/_fileio.c b/Modules/_io/fileio.c
similarity index 100%
rename from Modules/_fileio.c
rename to Modules/_io/fileio.c
diff --git a/Modules/_iobase.c b/Modules/_io/iobase.c
similarity index 100%
rename from Modules/_iobase.c
rename to Modules/_io/iobase.c
diff --git a/Modules/_stringio.c b/Modules/_io/stringio.c
similarity index 100%
rename from Modules/_stringio.c
rename to Modules/_io/stringio.c
diff --git a/Modules/_textio.c b/Modules/_io/textio.c
similarity index 100%
rename from Modules/_textio.c
rename to Modules/_io/textio.c
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp
index 3803c03ccd8..5640682b686 100644
--- a/PC/VC6/pythoncore.dsp
+++ b/PC/VC6/pythoncore.dsp
@@ -97,14 +97,6 @@ SOURCE=..\..\Modules\_bisectmodule.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_bufferedio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Modules\_bytesio.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\cjkcodecs\_codecs_cn.c
# End Source File
# Begin Source File
@@ -141,10 +133,6 @@ SOURCE=..\..\Modules\_csv.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_fileio.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\_functoolsmodule.c
# End Source File
# Begin Source File
@@ -153,7 +141,31 @@ SOURCE=..\..\Modules\_heapqmodule.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_iobase.c
+SOURCE=..\..\Modules\_io\bytesio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Modules\_io\stringio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Modules\_io\fileio.c
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\Modules\_io\bufferedio.c"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Modules\_io\iobase.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Modules\_io\textio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Modules\_io\_iomodule.c
# End Source File
# Begin Source File
@@ -181,10 +193,6 @@ SOURCE=..\..\Modules\_sre.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_stringio.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\_struct.c
# End Source File
# Begin Source File
@@ -193,10 +201,6 @@ SOURCE=..\..\PC\_subprocess.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_textio.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\_threadmodule.c
# End Source File
# Begin Source File
@@ -475,10 +479,6 @@ SOURCE=..\..\Modules\zlib\inftrees.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\io.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Objects\iterobject.c
# End Source File
# Begin Source File
diff --git a/PC/VS7.1/pythoncore.vcproj b/PC/VS7.1/pythoncore.vcproj
index a5df0d10620..e24e5730b6c 100644
--- a/PC/VS7.1/pythoncore.vcproj
+++ b/PC/VS7.1/pythoncore.vcproj
@@ -273,6 +273,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -361,18 +387,12 @@
-
-
-
-
@@ -397,9 +417,6 @@
-
-
diff --git a/PC/VS8.0/pythoncore.vcproj b/PC/VS8.0/pythoncore.vcproj
index 76fa47ec8d2..88af248be25 100644
--- a/PC/VS8.0/pythoncore.vcproj
+++ b/PC/VS8.0/pythoncore.vcproj
@@ -986,30 +986,38 @@
RelativePath="..\..\Modules\_csv.c"
>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1042,10 +1050,6 @@
RelativePath="..\..\Modules\_sre.c"
>
-
-
diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj
index dc64bfa7b71..f8ba1f1ecc3 100644
--- a/PCbuild/pythoncore.vcproj
+++ b/PCbuild/pythoncore.vcproj
@@ -974,10 +974,6 @@
RelativePath="..\Modules\_bisectmodule.c"
>
-
-
@@ -990,14 +986,6 @@
RelativePath="..\Modules\_csv.c"
>
-
-
-
-
@@ -1006,14 +994,6 @@
RelativePath="..\Modules\_heapqmodule.c"
>
-
-
-
-
@@ -1038,18 +1018,10 @@
RelativePath="..\Modules\_sre.c"
>
-
-
-
-
@@ -1090,10 +1062,6 @@
RelativePath="..\Modules\itertoolsmodule.c"
>
-
-
@@ -1170,6 +1138,42 @@
RelativePath="..\Modules\zlibmodule.c"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+