[Twisted-Python] can't get twisted to install on SunOS...
![](https://secure.gravatar.com/avatar/745feed27c5d4470c001aab846060c2e.jpg?s=120&d=mm&r=g)
Howdy all! I am using twisted as part of BuildBot, to automatically test my software on various platforms. One problem I am having on a couple of Suns is that twisted won't install. I have python 2.2.3 installed as you can see from the printout: gilda.unidata.ucar.edu% python Python 2.2.3 (#1, Jan 13 2004, 13:54:46) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
bash-2.03# pwd /home/ed/downloads/Twisted-1.1.1 bash-2.03# python setup.py install Traceback (most recent call last): File "setup.py", line 43, in ? from twisted import copyright File "twisted/__init__.py", line 23, in ? from python import compat File "twisted/python/compat.py", line 27, in ? import sys, types, socket, struct, __builtin__, exceptions File "/usr/local/lib/python2.2/socket.py", line 41, in ? from _socket import * ImportError: No module named _socket What's the deal here? Any suggestions for getting Twisted working on these suns? I've had trouble before because of the weird directories that sun uses, but this seems to be a problem within python. Thanks for any suggestions, Ed Hartnett Unidata
![](https://secure.gravatar.com/avatar/fdaa75758deee2fce225653d708b9557.jpg?s=120&d=mm&r=g)
Ed Hartnett [Thu, Jan 15, 2004 at 08:02:27AM -0700]:
File "/usr/local/lib/python2.2/socket.py", line 41, in ? from _socket import * ImportError: No module named _socket
Obviously, your Python installation came without socket module (which results from bad ./configure --options while building) You can either try to find package for it (some distributions split Python package, and they do it with a reason) -- or, I suggest, as usual, taking a look http://pkgsrc.org . I havent tested Python package on SunOS, but it seems it comes there with socked module enabled.
![](https://secure.gravatar.com/avatar/e8ac42c1b534015a23860237d6730ebc.jpg?s=120&d=mm&r=g)
Hi all, I begin to program in nevow and I can't bind a textbox with variable when I use html file to do sql request after. If I use Textbox.tac with Textbox.html, I don't know how have a textbox and if I use formpost.tac, I can have textbox binded with variable but I want to work with html file. Can people help me, please. Textbox.tac import random from twisted.application import service from twisted.application import internet from nevow import renderer from nevow import appserver class Textbox(renderer.HTMLRenderer): def data_textbox(self, context, data): return " DDI Number: " application = service.Application("Test") internet.TCPServer( 8888, appserver.NevowSite(Textbox(templateFile = "Textbox.html")) # appserver.NevowSite(Textbox()) ).setServiceParent(application) Textbox.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>First windows with a texbox</title> </head> <body> <ol nevow:data="textbox" nevow:render="string"></ol> </body> </html> formpost.tac from twisted.application import service from twisted.application import internet from nevow import appserver from nevow import renderer from nevow import tags from nevow import formless from nevow import freeform class IMyForm(formless.TypedInterface): foo = formless.Integer() class FormPage(renderer.Renderer): __implements__ = IMyForm, renderer.Renderer.__implements__ foo = 5 document = tags.html[ tags.body[ "Hello! Here is a form:", freeform.configure ] ] application = service.Application("formpost") internet.TCPServer( 8888, appserver.NevowSite( FormPage() ) ).setServiceParent(application)
![](https://secure.gravatar.com/avatar/56e4cc78ea7fcf3bb37888ebf23bc1f0.jpg?s=120&d=mm&r=g)
On Thu, Jan 15, 2004 at 08:02:27AM -0700, Ed Hartnett wrote:
Howdy all!
I am using twisted as part of BuildBot, to automatically test my software on various platforms.
One problem I am having on a couple of Suns is that twisted won't install. I have python 2.2.3 installed as you can see from the printout:
gilda.unidata.ucar.edu% python Python 2.2.3 (#1, Jan 13 2004, 13:54:46) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
bash-2.03# pwd /home/ed/downloads/Twisted-1.1.1 bash-2.03# python setup.py install Traceback (most recent call last): File "setup.py", line 43, in ? from twisted import copyright File "twisted/__init__.py", line 23, in ? from python import compat File "twisted/python/compat.py", line 27, in ? import sys, types, socket, struct, __builtin__, exceptions File "/usr/local/lib/python2.2/socket.py", line 41, in ? from _socket import * ImportError: No module named _socket
What's the deal here? Any suggestions for getting Twisted working on these suns?
Does "python -c 'import socket'" raise the same exception? I'm guessing it does, in which case this indicates a problem with the Python install. Without the socket module, Twisted can't do a heck of a lot. Jp
participants (4)
-
Ed Hartnett
-
Jp Calderone
-
Michal Pasternak
-
Steve Lepage