Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3397 defect closed invalid (invalid)

Windows Install Problem

Reported by: yakka Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

I’m having trouble getting twisted to work with windows. What am I doing wrong?

Initially I installed just the base twisted. I got the “spawnProcess not available since pywin32 is not installed” error so I installed http://www.activestate.com. I still had problems so I went back to the www.python.org install and installed pycrypt and pyopenssl. I had problems with not finding a dll so I tried http://www.slproweb.com ssl but that caused other problems so I uninstalled it. I’m using the latest version of python, pycrypt and pyopenssl. Now when I run the code below, I get the error


Traceback (most recent call last):

File "C:\Documents and Settings\Brian Downing\Desktop\PythonDev\pyEdaInterface\run_dir.py", line 41, in <module>

reactor.spawnProcess(pp, "dir")

File "C:\Python25\lib\site-packages\twisted\internet\posixbase.py", line 237, in spawnProcess

raise NotImplementedError, "spawnProcess not available since pywin32 is not installed."

NotImplementedError: spawnProcess not available since pywin32 is not installed.

------------------------------------------

My code is:


#uses twisted to call <dir> command
# based on http://twistedmatrix.com/projects/core/documentation/howto/process.html section "Verbose Example"

from twisted.internet import protocol
from twisted.internet import reactor

class PPDir(protocol.ProcessProtocol):

def init(self):

print "PPDir init called"


def connectionMade(self):

print "connectionMade!"


def outReceived(self, data):

print "outReceived! with %d bytes!" % len(data)
print " data %s" % data


def errReceived(self, data):

print "errReceived! with %d bytes!" % len(data)
print " data %s" % data


def inConnectionLost(self):

print "inConnectionLost! stdin is closed! (we probably did it)"


def outConnectionLost(self):

print "outConnectionLost! The child closed their stdout!"


def errConnectionLost(self):

print "errConnectionLost! The child closed their stderr."


def processEnded(self, status_object):

print "processEnded, status %d" % status_object.value.exitCode
print "quitting"
reactor.stop()


pp = PPDir()
reactor.spawnProcess(pp, "dir")
reactor.run()

#import win32process

#self.transport.closeStdin() # tell them we're done
#pp = MyPP(10)
#reactor.spawnProcess(pp, "wc", wc?, {})
#reactor.run()

print "run_dir 5"


Change History (3)

comment:1 Changed 6 years ago by glyph

  • Resolution set to invalid
  • Status changed from new to closed

Install pywin32.

http://pywin32.sourceforge.net/

http://sourceforge.net/project/platformdownload.php?group_id=78018

Since Twisted is functioning properly here I'm closing this ticket. However, perhaps you can suggest a way to make this less confusing for other users and open a new ticket for better documentation.

comment:2 Changed 6 years ago by yakka

Thank you for the quick response. That fixed the problem.

comment:3 Changed 3 years ago by <automation>

  • Owner glyph deleted
Note: See TracTickets for help on using tickets.