SocketServer inconsistencies

Daniel Klein DanielK at jBASE.com
Tue Feb 13 18:07:06 EST 2001


I am attempting to write some socket code which must be platform indepent
and the following behavior indicates that I can't use the SocketServer
module as I had hoped to do.

On Linux using Python 1.5.2, 'import SocketServer' correctly imports into
the global namespace. On Windows, using Python 2.0, the same command returns

>>> import SocketServer
Traceback (innermost last):
  File "<pyshell#0>", line 1, in ?
    import SocketServer
NameError: Case mismatch for module name SocketServer
(filename C:\DanielK\python\socketserver.py)

...however when I try 'import socketserver' (note the case of the command),
it actually _starts_  the server, ie

>>> import socketserver
Waiting for a connection...

I know I'm using different version on the different platforms but could
someone please advise how to use the SocketServer module on Windows please?
Has the implementation changed from 1.5.2 to 2.0?

Please forgive my naivety if the answer is obvious but this is a serious
problem for me. If I can't use the SocketServer module on Windows, I have to
go back to the drawing board and see what I would need to do to use the
lower level 'socket' module (which will require a great deal more work,
especially since I am new to network programming). :^(

Thanks for listening, and hopefully for an answer,

Daniel Klein






More information about the Python-list mailing list