python lists and newline character
diordna at gmail.com
Mon Jul 28 19:38:43 CEST 2008
Assuming domain is the string with the newline.
On Jul 28, 2008, at 1:32 PM, Support Desk wrote:
> Hello all,
> I am using os.popen to get a list returned of vpopmail
> users, something like this
> x = os.popen('/home/vpopmail/bin/vuserinfo -n -D
> x returns a list, of usernames, and I am trying to append the
> usernames with the domain like so
> for line in x:
> print line + ‘@’ + domain
> but instead of getting
> user at domain.com
> im getting a newline character like:
> Is there some way I can get this list without the newline characters
> being added. or somehow remove the newline characters. Any help
> would be appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list