Questions tagged [twisted.internet]

Twisted Internet: Asynchronous I/O and Events.

Twisted Internet is a collection of compatible event-loops for . It contains the code to dispatch events to interested observers and a portable API so that observers need not care about which event loop is running. Thus, it is possible to use the same code for different loops, from Twisted's basic, yet portable, select-based loop to the loops of various GUI toolkits like GTK+ or Tk.

Project and documentation: http://twistedmatrix.com/documents/current/api/twisted.internet.html

180 questions
0
votes
2 answers

How to solve twisted.internet.error.CannotListenError: Couldn't listen on any:8081: [Errno 98] Address already in use

I have a twisted python server which runs on port 8080, and i have written different API's which runs on this server. so i want all these API's to run on a single port no. but when i try to use same port all API's for ex : 8081 and run at the same…
G-Coder
  • 87
  • 2
  • 3
  • 9
0
votes
0 answers

Autobahn python twisted wamp client examples give TypeError for _parseClientTCP()

I wanted to run the Autobahn Python twisted examples listed here https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/basic. However, running the client.py always give me TypeError: $ python client.py -c…
0
votes
1 answer

Multiple calls of threads.deferToThread

I need to call two different methods simultaneously in order to save time and using results obtained from those methods i need to call another methods, So i came across deferToThread method in twisted.internet.threads which return a deferred object…
Yudi
  • 831
  • 4
  • 10
  • 19
0
votes
1 answer

TWISTED python - Wait for deferToThread to complete

I am new to Twisted framework, and I would like to make the program wait for the deferred thread to complete. import time from twisted.internet import defer, threads a=None def proc(n): time.sleep(n) print "Hi!!" a=1 return d =…
deeshank
  • 4,286
  • 4
  • 26
  • 32
0
votes
2 answers

Python Twisted- run() method not recognised

Given below is the code for a server: from twisted.internet import protocol from twisted.internet import reactor class Echo(protocol.Protocol): def dataRecvd(self, data): self.transport.write(data) class…
praxmon
  • 5,009
  • 22
  • 74
  • 121
0
votes
1 answer

running ffmpeg from Popen inside (twisted) timer.LoopingCall() stalls

I have an RTSP stream which i need to re-stream as HLS. When RTSP stream goes down (e.g. camera disconnects) I put a blue screen to let the user know that the camera went offline. HLS segmenter is running separately, listening on port 22200 for…
ierdna
  • 5,753
  • 7
  • 50
  • 84
0
votes
1 answer

Learning the Twisted framework and having trouble with the finger server

I am learning the Twisted framework for a project I am working on by using the Twisted Documentation Finger tutorial (http://twistedmatrix.com/documents/current/core/howto/tutorial/intro.html) and I'm having trouble getting my program to…
RPiAwesomeness
  • 5,009
  • 10
  • 34
  • 52
0
votes
1 answer

How to run the Twisted Matrix Web Server

I want to run the demo that is part of open source project JInfinote. The demo server is written using Twisted Matrix library/server. However I have no idea how to run this and if it's standalone server that I need to download in order to run or is…
kubal5003
  • 7,186
  • 8
  • 52
  • 90
0
votes
1 answer

Text not being sent in Twisted

I am following official Twisted examples about client/server. I am using LineReceiver.sendLine() to send text from client to server. This code works: def connectionMade(self): self.sendLine("Hello, world!") and I can see it on my server side.…
alex
  • 10,900
  • 15
  • 70
  • 100
0
votes
1 answer

twisted: test my service's stop sequence

We have a complex multiservice that needs to do some fairly intricate accounting when shutting down in order to implement a "graceful" shutdown. I'm trying to write tests for this under trial. The issue is that the reactor is effectively a …
bukzor
  • 37,539
  • 11
  • 77
  • 111
0
votes
1 answer

Porting Python Raspberry Pi application to Twisted - how to handle background threads that poll the hardware

I have created a small device that uses a small Raspberry Pi single-board computer to allow me to remotely dispense treats to my cat and monitor him and the surroundings with a web cam. \ The software consist of a single Python module that hosts a…
0
votes
1 answer

Python / Twisted matrix and SOAP threading

I have an application built with Python / Twisted Matrix which uses methods from a SOAP client in order to send some messages. Problem is that sometimes i want to send a lot of messages and when that happens i would like to do it in multiple…
Liviu
  • 1,023
  • 2
  • 12
  • 33
-1
votes
1 answer

Unit Test for twisted addCallback with nested method

I have a situation to write a unit test for the below code, please help me out here. def method1(self): self.method2() def method2(self): def method2_success(result): if result.code == 200: self.state =…
-1
votes
1 answer

Twisted: how to read from a client socket after writing data to the same socket?

I am attempting to write a simple TCP server in twisted which has to perform the following operations in sequence: A client connects to the server and the KEEPALIVE flag for this connection is set to 1. The server receives data from the client. It…
HumptyDumptyEIZ
  • 374
  • 1
  • 6
  • 18
-2
votes
1 answer

Ethernet media converter

Ethernet media converter works in pair A on the internet source side and B in the user side,the question is if B (user side converter) burn or damage should we change bothe side converter or not. Is it possible to change only damage convert or both…
1 2 3
11
12