Re: Problem with print and output to screen

2012-12-11 Thread Mike
El martes, 11 de diciembre de 2012 20:07:09 UTC-3, Joel Goldstick escribió: > On Tue, Dec 11, 2012 at 6:00 PM, Dave Angel wrote: > > > On 12/11/2012 05:53 PM, Joel Goldstick wrote: > > > When you read the file line by line the end of line character is included > > > in the result > > > > >

Re: Problem with print and output to screen

2012-12-11 Thread Joel Goldstick
On Tue, Dec 11, 2012 at 6:00 PM, Dave Angel wrote: > On 12/11/2012 05:53 PM, Joel Goldstick wrote: > > When you read the file line by line the end of line character is included > > in the result > > > > try user[:-1] instead to strip the return from your printed text > > > > The catch to that is

Re: Problem with print and output to screen

2012-12-11 Thread Dave Angel
On 12/11/2012 05:53 PM, Joel Goldstick wrote: > When you read the file line by line the end of line character is included > in the result > > try user[:-1] instead to strip the return from your printed text > The catch to that is the last line in the file might not have a newline. In that case, w

Re: Problem with print and output to screen

2012-12-11 Thread Joel Goldstick
When you read the file line by line the end of line character is included in the result try user[:-1] instead to strip the return from your printed text On Tue, Dec 11, 2012 at 5:31 PM, Mike wrote: > Hello, I am learning python and i have the next problem and i not > understand how fix. > The

Re: Problem with print and output to screen

2012-12-11 Thread Dave Angel
On 12/11/2012 05:31 PM, Mike wrote: > Hello, I am learning python and i have the next problem and i not understand > how fix. > The script is very simple, shows in the terminal the command but, the row is > divided in two: > Example: > > > /opt/zimbra/bin/zmprov ga u...@example.com > |egrep "(z

Problem with print and output to screen

2012-12-11 Thread Mike
Hello, I am learning python and i have the next problem and i not understand how fix. The script is very simple, shows in the terminal the command but, the row is divided in two: Example: /opt/zimbra/bin/zmprov ga u...@example.com |egrep "(zimbraPrefMailForwardingAddress:|zimbraPrefMailForward