Re: right adjusted strings containing umlauts

2013-08-08 Thread jfharden
On Thursday, 8 August 2013 15:23:46 UTC+1, Kurt Mueller wrote: > I'd like to print strings right adjusted. > > print( '>{0:>3}<'.format( 'ä' ) ) > Make both strings unicode print( u'>{0:>3}<'.format( u'ä' ) ) Why not use rjust for it though? u'ä'.rjust(3) -- Jonathan -- http://mail.python

Re: Is this PEP-able? fwhile

2013-06-26 Thread jfharden
On Wednesday, 26 June 2013 01:40:22 UTC+1, Dennis Lee Bieber wrote: > (hmmm, does any > language have a continue that can go to the next iteration of an outer > loop?) Perl allows next with a label: > perldoc -f next next LABEL nextThe "next" command is like the "continue" statement i

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread jfharden
On Thursday, 20 June 2013 11:20:20 UTC+1, Jonathan Harden wrote: > ...SNIP > Sorry about the second post, it took a very long time to show up, long enough I thought it had been lost. -- http://mail.python.org/mailman/listinfo/python-list

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread jfharden
On Thursday, 20 June 2013 23:04:39 UTC+1, Peter Otten wrote: > (2) Fiddle with terminal options, e. g. > > attrs = termios.tcgetattr(outSlave) > attrs[1] = attrs[1] & (~termios.ONLCR) | termios.ONLRET > termios.tcsetattr(outSlave, termios.TCSANOW, attrs) > > p = subprocess.Pop

New line conversion with Popen attached to a pty

2013-06-20 Thread jfharden
Hi, Sorry if this appears twice, I sent it to the mailing list earlier and the mail seems to have been swallowed by the black hole of email vagaries. We have a class which executes external processes in a controlled environment and does "things" specified by the client program with each line of