I think it's a fairly safe bet that under DOS, python does not support sockets.
No doubt you are right. However I use DOS Edit on my XP install on almost a daily basis. All of the examples on this tut. were written in Edit. I love it as a program. Edit <filename> save exit python <filename>. It's nice and quick.