I have to write a little python program to manage a serial port radio modem.
I have to send some AT commands and read resposes. This is not a problem,
twisted examples are enough.
...but I have a situation that makes things complicated:
Anytime the modem can send back to serial port a line starting with "++"...
I have to catch it and do some analysis that could take a long time.
How to solve????????????????
I have found only this manner:
- a thread continuously read from serial port.
- if it receive a line stanting with "++" put it in a queue (I could
name it "unexpected-queue")
- this thread also check for commands on another queue (commands-queue)
- if there are something on command-queue it send command to serial
port an put
replies on another queue (replies-queue)
- Another thread loop to check unexpected-queue and do something if
there are messages.
- main program sent commands to command-queue and read replies from
Does anyone have better ideas or suggestions?
I have an xml file in my application,
I have created an element using
Example goes like this.........
and i appeneded it by using append() method.
But how i can reflect this change to my xml file?
and one more thing is i want to create element with some other parameters....
<abc m=" " n=" ">
and i have m and n values as strings with me.
can anybody help me to create this element and write it to the existing xml file
as a child of an existing element?
Thanks in advance..
Forgot the famous last words? Access your message archive online at http://in.messenger.yahoo.com/webmessengerpromo.php
I have two pieces of code (see: https://gist.github.com/dstufft/9dc9978dc0af77e82f0c) one "works" (in that it fails verifying the host key like i'd expect) and one doesn't ("it never tries to verify the host key and just exists immediately).
I don't understand *why* though, why does the connectionReady dance make it work?
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
Twisted Sprint Report (2013-09-23)
PyconUK 2013, Coventry, England
* Lasse Bromose
* Stephen Evans
* Holger Kraus
* Lukasz Prasol
* Christophe Reche
* Richard Wall
Five Twisted enthusiasts were introduced to the Twisted development
process. We closed 2 tickets, made some progress on 2 others and
improved some of the development process documentation.
Christophe, Lukasz and Holger helped improve the Trial Howto
Documentation. rwall reviewed and merged.
Lasse and Stephen helped with the removal of "has_key" from
twisted.mail and documented various undocumented twisted.mail
tests. rwall reviewed and merged.
Holger reviewed and fixed broken links to Nevow and Pydoctor.
Lasse and Stephen reviewed the twisted.web Agent Howto and updated
the examples to use task.react.
Lukasz and Holger reviewed Shira's new SMTP server tutorial.
(Lukasz will attach their patch / notes when he gets home.)
Thanks to all of you for your help. I hope you found it interesting
and look forward to more contributions from you in the future.
I'm trying to implement an IWriteDescriptor using raw sockets.
So far this is what I wrote... but it doesn't work:
Am I doing something obviously wrong here?
I certainly am able to use raw socket + scapy correctly without Twisted.