FAQ
G'day all,

Apologies if this is really basic stuff...

I run python inside cygwin on my windows98 box. (I have recently
upgraded from python 2.1 to 2.2, but I don't know if that is the
problem because I haven't tried to use socket.py until now). I traced
my problem down to the python library socket. Here is a session:

$ python
Python 2.2.2 (#1, Dec 31 2002, 12:24:34)
[GCC 3.2 20020927 (prerelease)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import socket
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/socket.py", line 41, in ?
from _socket import *
ImportError: dlopen: Win32 error 1157

I found out that _socket is meant to be built-in so I did this:
import sys
print sys.builtin_module_names
('__builtin__', '__main__', '_sre', '_symtable', 'errno',
'exceptions',
'gc', 'imp', 'marshal', 'new', 'posix', 'signal', 'sys', 'thread',
'xxsubtype')
>>>

(Apparently '_socket' should appear above).

So what's going on? Is my installation totally mangled, or is there
some easy fix? I have no _socket.py, but I do have a _socket.dll
(/usr/lib/python2.2/lib-dynload/_socket.dll)


Thanks in advance,

Peter Ballard
Adelaide, AUSTRALIA
pballard at ozemail.com.au
http://www.ozemail.com.au/~pballard/

Search Discussions

  • Steve Holden at Mar 7, 2003 at 1:40 pm
    "Dennis Lee Bieber" <wlfraed at ix.netcom.com> wrote in message
    news:jkklj-3e3.ln1 at beastie.ix.netcom.com...
    Peter Ballard fed this fish to the penguins on Thursday 06 March 2003
    09:45 am:
    I run python inside cygwin on my windows98 box. (I have recently
    What's wrong with the Python versions built for Windows directly?
    What, you mean apart from the fact that it doesn't run in Cygwin? There are
    many reasons why you might prefer to run the Cygwin version of Python under
    Windows (I personally use 2.2.2 under Cygwin and the 2.2.1 Windows release,
    allowing me to study a range of compatibility issues, albeit a remarkably
    small number :-)

    For example: I run Apache 2.0.43 as a Windows taskm so it makes sense to use
    Windows Python 2.2.1 for Python CGIs in that environment. Apache 1.3.24
    under Cygwin, so it makes sense to use Cygwin Python 2.2.2 for CGIs in that
    environment.

    This is useful for ensuring a wider range of compatibility using a
    single-boot environment than I would otherwise be able to handle. And don't
    get me started on ensuring compatibility with Xitami- and IIS-CGI. Come to
    that, why not just run Unix on the computer and forget all about Windows?
    <0.75 wink>

    and-im-sure-there-are-many-other-uses-too-ly y'rs - steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/pwp/
    Register for PyCon now! http://www.python.org/pycon/reg.html

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 6, '03 at 5:45p
activeMar 7, '03 at 1:40p
posts2
users2
websitepython.org

2 users in discussion

Steve Holden: 1 post Peter Ballard: 1 post

People

Translate

site design / logo © 2022 Grokbase