Here is absolutely minimal application so you could try to reproduce it on your machine.
Having two files for example in /home/aln/tmp/tw_test:
server.tac
MyLib.py
MyLib.py
class Solver(object):
def solve(self):
""" do extremely complex stuff here """
print "Hello from solve"
server.tac
#!/usr/bin/python
impor...
Hi, I tried urllib{2}, pycurl and I'm looking at twisted's new http client.
But:
I found urllib2 difficult to perform a file upload
pycurl multi looks right but unpythonic
twisted's http client does not support persistent connection (didn't check the file upload capability)
Is there any other alternative?
...
Hi,
I'm using iPython right now to interactively set up a Twisted network. The script that I run in iPython describes best of what I have to do:
import router, pdb
# creates nodes which encapsulate RandomVector and VectorAdder objects
a = router.LocalNode(router.RandomVector, '/topic/a_c')
b = router.LocalNode(router.RandomVector, '/t...
I'm recently started to learn Twisted framework and now looking for some cheat sheets/reference cards with basic Twisted stuff. Such as deferreds, callbacks, reactor, protocols, factories, transports, so on.
At the moment found nothing neither on http://refcardz.dzone.com/ nor on http://www.cheat-sheets.org/
Any help appreciated.
...
What is the significance of the decorators
@reactor.callWhenRunning,
@results_deferred.addCallback
@results_deferred.addErrback.
Also what are deferred strings, for example in the
twisted.internet.utils.getProcessOutput()
returns a deferred string what exactly is happening here?
I am new to twisted hence this might be a very ...
Code first:
'''this is main structure of my program'''
from twisted.web import http
from twisted.protocols import basic
import threading
threadstop = False #thread trigger,to be done
class MyThread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.start()
def run(self):
whi...
What is the Lua equivalent of Twisted Python, Eventmachine for Ruby, NIO for Java, etc.?
If there is none, how does one do non-blocking event-based network I/O?
In general, how does one solve the C10K problem in Lua?
Thanks!
...
I want to develop a anonimous chat website like omgele.com.I know that this website is devloped in python using twisted matrix framework.Using twsited matrix its easy to devlop such website.
But i am very comfortable in java and have 1 yr expericne in it.and dont know python.
What shold i do? Should i start
learning python to take a...
I unsuccessfully tried using txredis (the non blocking twisted api for redis) for a persisting message queue I'm trying to set up with a scrapy project I am working on. I found that although the client was not blocking, it became much slower than it could have been because what should have been one event in the reactor loop was split up ...
Hi,
Im trying to write some kind of multi protocol bot (jabber/irc) that would read messages from fifo file (one liners mostly) and then send them to irc channel and jabber contacts. So far, I managed to create two factories to connect to jabber and irc, and they seem to be working.
However, I've problem with reading the fifo file - I...
Hi all,
I have learnt Python for about a month as a one year's PHPer.And I started from Twisted as I'm working in a corporation supplying webservice.I have finished some simple application such as data transferring service,page images-fetch service etc.But the problem is ,I don't understand the struture of codes I wrote in the programs ...
I've got a project where I'm using Twisted for my web server. When exceptions occur (such as network errors), it's printing to the console.
I've already got logging through Python's built-in log module - is there any way to tell the reactor to use that instead?
What's the usual pattern for this?
...
I'd like to be able to debug Punjab, a twisted python application, in Netbeans so that I can step through the code. How can I do that? Alternatively, how could I do it in a different debugger?
...
Hey,
Im trying to write a program that would be listening for data (simple text messages) on some port (say tcp 6666) and then pass them to one or more different protocols - irc, xmpp and so on. I've tried many approaches and digged the Internet, but I cant find easy and working solution for such task.
The code I am currently fighting ...
Hi at all,
I need to create a simple browser chat using a Comet webserver.
So I have found Twisted and Tornado.
What is the difference ?
...
Dear pythoners,
I have a problem with using Twisted for simple concurrency in python. The problem is - I don't know how to do it and all online resources are about Twisted networking abilities. So I am turning to SO-gurus for some guidance.
Python 2.5 is used.
Simplified version of my problem runs as follows:
A bunch of scientific d...
Hey guys,
I tried to write a XMPP Client using this mentioned factories. Now my program only needs this connection during a short time. How can I make the Factory to stop reconnection attempts? Unfortunately stopTrying doesn't work. Do I have to disconnect running connections before?
Any help would be appreciated :)
...
I'm trying to answer the following question out of personal interest:
What is the fastest way to send 100,000 HTTP requests in Python?
And this is what I have came up so far, but I'm experiencing something very stange.
When installSignalHandlers is True, it just hangs. I can see that the DelayedCall instances are in reactor._newTimedCa...
Hi!
One of my protocols is connected to a server, and with the output of that I'd like to send it to the other protocol.
I need to access the 'msg' method in ClassA from ClassB but I keep getting: exceptions.AttributeError: 'NoneType' object has no attribute 'write'
Actual code:
from twisted.words.protocols import irc
from twisted.i...
I have a project that is based on Twisted used to
communicate with network devices and I am adding support for a new
vendor (Citrix NetScaler) whose API is SOAP. Unfortunately the
support for SOAP in Twisted still relies on SOAPpy, which is badly out
of date. In fact as of this question (I just checked), twisted.web.soap
itself hasn't e...