[Twisted-Python] Question : Failed to read gpsfake

2012-02-23 Thread bino oetomo
Dear All ...

I try to simulate a gps with gpsfake.
gpsfake create virtual port at /dev/pts/4

my code is posted at : http://pastebin.com/j2wn1aXh

It's never reach the 'lineReceived' part.
I Got no error msg.

The log only said

2012-02-23 16:02:50+0700 [-] Log opened.
2012-02-23 16:02:50+0700 [-] twistd 11.1.0 (/usr/bin/python 2.6.6) 
starting up.
2012-02-23 16:02:50+0700 [-] reactor class: 
twisted.internet.pollreactor.PollReactor.
2012-02-23 16:02:50+0700 [-] debug : Serial Service start


Kindly please give me any enlightment about this problem

Sincerely
-bino-





___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Question : Failed to read gpsfake

2012-02-23 Thread Itamar Turner-Trauring
On 02/23/2012 04:22 AM, bino oetomo wrote:
> Dear All ...
>
> I try to simulate a gps with gpsfake.
> gpsfake create virtual port at /dev/pts/4
>
> my code is posted at : http://pastebin.com/j2wn1aXh
>
> It's never reach the 'lineReceived' part.
> I Got no error msg.
>
> The log only said
>
> 2012-02-23 16:02:50+0700 [-] Log opened.
> 2012-02-23 16:02:50+0700 [-] twistd 11.1.0 (/usr/bin/python 2.6.6)
> starting up.
> 2012-02-23 16:02:50+0700 [-] reactor class:
> twisted.internet.pollreactor.PollReactor.
> 2012-02-23 16:02:50+0700 [-] debug : Serial Service start
>
>
> Kindly please give me any enlightment about this problem

By default LineReceiver assumes you are receiving lines that end with 
'\r\n'. Are you sure that's what the fake serial port is sending? 
Possibly you want to just use a custom protocol and override 
dataReceived to begin with.

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Conch text attribute flattening quirks

2012-02-23 Thread exarkun
On 22 Feb, 04:15 pm, jonathan+twis...@jsphere.com wrote:
>On Wed, Feb 22, 2012 at 17:25, Tim Allen  wrote:
>>...that is, there's no code for 'end bold' or 'end italics' (or blink, 
>>dim,
>>underline, invisible, any kind of colouring, etc.) just an 'end all
>>special attributes' code. Therefore it's reasonable for conch's helper
>>library to not handle nested formatting, since no terminal program 
>>will
>>produce such a thing, because it's impossible to represent in the
>>VT100/VT200 formatting language.
>
>I understand this, but then what is the point of placing content into
>A.bold in the first place? Why not just drop A.bold into a flat
>stream: [foo, A.bold, bar]

I think the behavior you observed is a bug in the implementation (I 
noticed it during our IRC conversation the other day as well, but wasn't 
sure if I'd made a mistake or misread something).  It should be fixed, 
and perhaps that TODO test made to pass. :)

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Problem with address-literals and SMTP

2012-02-23 Thread exarkun
On 13 Feb, 11:30 pm, george.paj...@glentel.com wrote:
>We're deploying Zenoss and found that some of the email alert messages 
>that were being delivered to Zenoss were not being properly handled. 
>The problem turns out to be an omission in the Python Twisted SMTP 
>class in that it cannot handle an email address that contains an 
>address-literal (cf. Section 4.1.2 or RFC 5321), for example, 
>zenoss@[10.100.1.192]
>
>This is a valid mailbox address but the 8.1.0 version of the Twisted 
>SMTP Class rejects such addresses with a "501 Syntax error". No idea if 
>this has been fixed in more recent versions (and no time to find out 
>for myself).
>
>I am no Python programmer so I'm sure others can do better than this, 
>but here is my fix for this problem:

Thanks.  I filed a ticket for this in our issue tracker, 
.

Jean-Paul

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python