Questions tagged [twisted]

Twisted is an event-driven networking engine, written in Python and implementing many different protocols.

Twisted is a multi-protocol, event-driven, liberally-licensed open-source networking engine written in Python. It is useful for implementing both clients and servers, and scales up to large websites and down to embedded devices. Twisted makes it easy to implement custom network applications.

3465 questions
1
vote
1 answer

Python Twisted -- how to control buffered/unbuffered input in Telnet or SSH?

I want to write a Python Twisted server that serves text to its clients, and I want the clients to be able to write text back to manipulate the server. I will use Telnet, and the clients will use Putty or some similar terminal...I would also be open…
Mossen
  • 1,275
  • 2
  • 12
  • 15
1
vote
1 answer

Fetching 'https' pages using 'urlopen' vs getpage()

I'm trying to get an 'https' webpage(for eg: https://github.com/twitter/bootstrap) using urlopen(), it returns the page without any problem. But we are evaluating Twisted for a new project and trying to use getPage() to fetch the same page. But…
user845616
1
vote
0 answers

Client+server in Twisted

I have Client and multiclient Server, they're simply replacing messages. Some messages have to be changed during connection, so I have to create some sort of "Proxy", which will be changing and passing msgs. It will be looking like this: Client -->…
1
vote
1 answer

Why does this twisted server interact wrongly with a process?

The server is at https://github.com/EmeraldHaze/Socketd/blob/master/Serv.py ; the process is at https://github.com/EmeraldHaze/QFTSOM/blob/master/main.py A client too test this is at…
technillogue
  • 1,482
  • 3
  • 16
  • 27
1
vote
1 answer

How to get mail report about all unhandled exceptions inside of twisted server?

I'm initialize 2 servers in one twisted script. So I want to get all unhadled exception inside of it on my mail. Is it posible? Thank you!
Oduvan
  • 2,607
  • 3
  • 24
  • 24
1
vote
1 answer

Handle SimpleXMLRPCServer calls and Asyncore.dispatchers events from the same event-loop

How can I handle Asyncore.dispatcher(s) and SimpleXMLRPCServer events from the same event-loop? P.S. I already know that some of you might recommend Twisted for this, but the problem with Twisted is that it is a little bit too high-level library for…
user389238
  • 1,656
  • 3
  • 19
  • 40
1
vote
2 answers

Blocking Thrift calls with Twisted

I have a Twisted/Thrift server that uses the TTwisted protocol. I want to keep connections from clients open until a given event happens (I am notified of this event by the Twisted reactor via a callback). class ServiceHandler(object): …
ide
  • 19,942
  • 5
  • 64
  • 106
1
vote
0 answers

twisted and print statement

I wonder if I am using print statement with twisted in some asynchronous call, is this statement block event loop? Also I am interested in standart logging module usage with logging.FileHandler handler.
Mykola Kharechko
  • 3,104
  • 5
  • 31
  • 40
1
vote
2 answers

Am I using headers properly in python Twisted using getPage?

Below us my callback for fetching a page using twisted. client.getPage(iUrl,headers,method='GET',cookies=cj).addCallback(self.processPage,iUrl).addErrback(self.printError,iUrl) Here is the format for my headers. headers =…
user959129
1
vote
0 answers

Twisted: builtins.TypeError: a bytes-like object is required, not 'str'

I'm using python3.8 and twisted 22.10.0. I'm connecting freeswitch with reactor and using a event socket to handle the events.I'm able to make TCP connection with freeswitch and after executing the reactor thread I get the following error Unhandled…
Eranki
  • 750
  • 1
  • 11
  • 30
1
vote
2 answers

How do I achieve a webpush with data coming from a socket?

Here is my current code: #!/usr/bin/env python from twisted.application import internet, service from twisted.application.service import IServiceMaker, MultiService from twisted.protocols import basic from twisted.internet import reactor, protocol,…
refeniz
  • 525
  • 1
  • 5
  • 14
1
vote
1 answer

RuntimeError: await wasn't used with future when using twisted, pytest_twisted plugin, and asyncio reactor

I'm running into the RuntimeError: await wasn't used with future in a simple pytest. I have the pytest_twisted plugin enabled with the argument --reactor asyncio. I can see that twisted is using asyncio and all my twisted tests run fine. However,…
robert_difalco
  • 4,821
  • 4
  • 36
  • 58
1
vote
1 answer

How to fix OpenSSL.SSL.Error: [('SSL routines', '', 'certificate verify failed')] in twisted framework?

I am using MacOS ventura and pycharm and trying to establish a connection between a twisted server/client with tls following this guide: TLS server with client authentication via client certificate verification Therefore i created a self signed…
ozb
  • 21
  • 6
1
vote
1 answer

How can twisted spawnProcess send ffmpeg filter_complex parameters with embedded quotes?

I am attempting to send these (simplified) parameters to ffmpeg via reactor.spawnProcess. ['-filter_complex', '"[0:v]setpts=PTS-STARTPTS,scale=-1:720 [a0];[a0]pad=w=1280:h=720:x=-1:y=-1:color=black[out]"' but presumedly code is doing some form of…
Stephen
  • 23
  • 5
1
vote
1 answer

scrapy run thousands of instance of the same spider

I have the following task: in the DB we have ~2k URLs. for each URL we need to run spider until all URLs will be processed. I was running spider for a bunch of URLs (10 in one run) I have used the following code: from scrapy.crawler import…
Roman
  • 1,883
  • 2
  • 14
  • 26
1 2 3
99
100