Questions tagged [twistd]

`twistd` is an utility that can be used to run twisted applications. It's shipped with `twisted` itself and it automatically takes care for you of logging, daemonizing, permissions and more; while still allowing you to configure all of these. Use this tag for questions about usage and problems with twistd command, pay attention to the difference between `twistd` and `twisted` and DO NOT use this tag for general twisted-related questions.

53 questions
1
vote
0 answers

Twisted plugin needs to fail fast of port is taken

I have a twistd plugin that listens on a port and does very simple things. The problem is that when I start it, if the post is not available it just sits there with the process running, but doing nothing. I need the process to exit immediately in…
Matthew Scouten
  • 15,303
  • 9
  • 33
  • 50
1
vote
1 answer

Twistd - using service.Application with Options to allow argument parsing

I would like to run my server as a application. To do that, I have a MyServer(name, port, host, testMode=False) class (which inherits from DatagramProtocol object). In another file I created a few commands to create and start my server. More or…
Ziva
  • 3,181
  • 15
  • 48
  • 80
1
vote
0 answers

Python standard logger instead of twistd logger

I'm trying to daemonize a simple Twisted application which uses Python2.7 standard library logger. Here is the setup : Python application file (run.py) : import logging import logging.config from twisted.internet import reactor import conf def…
T. Decker
  • 137
  • 6
1
vote
1 answer

Python - Twisted client - Maximum size of data in dataRecived method

I've recently been using and learning twisted for creating TCP client socket. I got that dataRecived method of Protocol class, returns all data together. It means all data ConCat with each other and finally it returns a long byte data from…
Aida.Mirabadi
  • 996
  • 4
  • 10
  • 27
1
vote
1 answer

writing systemd unit file and specfile for a python twistd application

I have given a task to write the systemd unit file for a python twistd application and create rpm of it. The application is open source and you can find it here. I have written the unit file as: [Unit] Description=ECManaged Agent for monitoring and…
Arindam Choudhury
  • 2,816
  • 2
  • 18
  • 22
1
vote
2 answers

twistd Application (.tac) with TCPServer not working, while regular Twisted .py works with listenTCP

I currently trying to convert an application based on twisted to the twistd Twisted Application framework (TAC). The application works if I start the .py, but not with the "twistd -noy zmq2tcp.tac" daemon. The ZMQ connections seems properly opened,…
Pivert
  • 755
  • 5
  • 17
1
vote
0 answers

Twistd amp protocol : Producer/Consumer pattern?

I would like to use protocal to send data between server/client : list of unicode (string) that exceed the limit size of 65,535 bytes. A nice and clean solution to deal with the limit size problem is to Implement Producer/Consumer…
agstudy
  • 119,832
  • 17
  • 199
  • 261
1
vote
1 answer

How to daemonize a custom reactor (txnet) with twistd

I'm using txnet in an application to monitor if some servers are up, it has a web interface so the reactor along with listenICMP for ping requests (is the reactor provided in txnet) also listenTCP for the web server. My question is about how to…
Alejandro
  • 51
  • 6
1
vote
1 answer

twisted's twistd tool parsing command line parameters

I've got a simple .tac file with a simple service, I start it with: twistd -y service.tac and everything works fine. But inside the tac file I've got a hardcoded port for my service and I would like to make it dynamic. The most desired way I want…
ducin
  • 25,621
  • 41
  • 157
  • 256
1
vote
1 answer

twisted python daemonization and port bindings

I am using the following script from the Twisted tutorial (with slight modification): from twisted.application import internet, service from twisted.internet import reactor, protocol, defer from twisted.protocols import basic from twisted.web import…
lollercoaster
  • 15,969
  • 35
  • 115
  • 173
1
vote
1 answer

opening till through printer with Python

I have Epson TM-U220B Network printer and a cash drawer. I am developing Python Web app I managed to configure printer over my application. My printer is working fine, I just want to open till when I print ticket. I found some codes over internet…
Fi3n1k
  • 863
  • 3
  • 12
  • 20
1
vote
1 answer

Showing text on mouseover - Title element inconsistent, title attribute does nothing

I'm trying to do something similar to this (display a bit of text when a user mouses over an element). Here's a snippet of the html my script generates:
Ricky Moreno
  • 189
  • 1
  • 2
  • 7
1
vote
1 answer

Twistd socket ownership

I have a daemon which listens to a socket in /var/run. I start the daemon using an init script (as root, obviously), and I'm using the twistd --uid and --gid options to drop privileges to an unprivileged user. The socket, however, is still owned by…
Ondergetekende
  • 1,065
  • 9
  • 22
0
votes
2 answers

stack dump in twisted app.py 'application' error when using twistd but works with python?

I am trying to use twisted but when i try to run some of the example code provided with the twisted package, it seems to always crash when i use "twistd" instead of "python" for example, using the example code given with twisted, if i run to…
0
votes
1 answer

Twisted web problem when serving docx files

I have a question for you! I'm running a simple webserver with twistd web and it works great must of the time. I have a problem serving .docx files. Let me explain with an example. On my webserver I have two files: file.pdf and file.docx (the x is…
toto
  • 110
  • 1
  • 6