Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41845

Re: Separate Rows in reader

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.052
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'output': 0.05; 'problem?': 0.07; 'bracket': 0.16; 'buggy': 0.16; 'commas,': 0.16; 'mylist': 0.16; 'received:74.208.4.195': 0.16; 'subject:reader': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'split': 0.19; '>>>': 0.22; 'input': 0.22; 'header:User-Agent:1': 0.23; 'software.': 0.24; 'header:In- Reply-To:1': 0.27; 'tried': 0.27; "i'm": 0.30; '25,': 0.31; 'quotes': 0.31; 'url:python': 0.33; 'monday,': 0.33; 'problem': 0.35; 'advice': 0.35; 'version': 0.36; 'url:org': 0.36; 'list.': 0.37; 'starting': 0.37; 'implement': 0.38; 'skip:o 20': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'previous': 0.38; 'embedded': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'march': 0.61; 'show': 0.63; 'received:74.208': 0.68; "it'd": 0.84; 'specs.': 0.84; 'rusi': 0.91; '2013': 0.98
Date Mon, 25 Mar 2013 21:40:51 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version 1.0
To python-list@python.org
Subject Re: Separate Rows in reader
References <fdcdb6d8-c63a-4909-8b56-13204a0d474c@googlegroups.com> <adf4e759-2825-4ec8-9992-a0a6a91c0843@googlegroups.com> <4e1e93e5-14bd-4408-9c92-3c340e558deb@googlegroups.com> <f085bd7b-2bb3-46be-88b5-292e5f181a95@kw7g2000pbb.googlegroups.com> <3054bd15-f3d3-4568-aea2-567dd6d762de@googlegroups.com>
In-Reply-To <3054bd15-f3d3-4568-aea2-567dd6d762de@googlegroups.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:TqpM77QkHjOFRX4YtLpcI0H/Lxi/XpzyOVO1FMdL3tz nyD8lZ3kUIG5HDop7QkupvLo4QGb3b8n3FZFTI6CbLIj4sdxYr FloiJwr2EpCjSJ60gPj6dw9lAmjIElQGPHQxc++JIi2bH3mLpD qVU6nponGtJXhgiJfF8d+0UyoKk9qyu5o5dVSch+PBkm6aL52d ZGMYwj7WSj3abPcjS+TMsSIeH1v/aksxLBQTzL92PzEA37Xqpe HWZ5n6Qmj8G4eslOq1NjOEifnW952ShU9YtX7hj/hueKo6n9mH 6tzkSP5XVct0Js0gd9GydQxZKI6XBWwImRDA+Aytk+Uh8JGhA= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3710.1364262083.2939.python-list@python.org> (permalink)
Lines 41
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1364262083 news.xs4all.nl 6913 [2001:888:2000:d::a6]:38330
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:41845

Show key headers only | View raw


On 03/25/2013 09:05 PM, Jiewei Huang wrote:
 > On Monday, March 25, 2013 11:51:51 PM UTC+10, rusi wrote:

If you insist on using GoogleGroups, then make sure you keep your quotes 
small.  I'm about to stop reading messages that are double-spaced by 
buggy software.

>>> <SNIP>
>>

>>
>>
>> Have you tried the split (and perhaps strip) methods from
>>
>> http://docs.python.org/2/library/stdtypes.html#string-methods
>>
>> ?

You got lots of specific advice from your previous thread.  So which 
version did you end up using?  It'd make a good starting place for this 
"problem."



> can show me one line of how to implement it base on my problem?
>

As long as the input data is constrained not to have any embedded 
commas, just use:

     mylist = line.split(",")


instead of print, send your output to a list.  Then for each line in the 
list, fix the bracket problem to your strange specs.

     outline = outline.replace("[", "(")

-- 
-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-23 22:20 -0700
  Re: Separate Rows in reader Dave Angel <davea@davea.name> - 2013-03-24 01:46 -0400
    Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-24 00:34 -0700
      Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-24 01:18 -0700
    Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-24 01:11 -0700
      Re: Separate Rows in reader Dave Angel <davea@davea.name> - 2013-03-24 09:03 -0400
      Re: Separate Rows in reader Tim Chase <python.list@tim.thechases.com> - 2013-03-24 08:49 -0500
        Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-24 08:57 -0700
          Re: Separate Rows in reader Tim Chase <python.list@tim.thechases.com> - 2013-03-24 13:28 -0500
            Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-24 19:08 -0700
    Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-24 01:11 -0700
  Re: Separate Rows in reader ypsun <winter0128@gmail.com> - 2013-03-24 03:58 -0700
  Re: Separate Rows in reader ypsun <winter0128@gmail.com> - 2013-03-24 04:10 -0700
    Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-24 23:52 -0700
      Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-25 06:51 -0700
        Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-25 18:05 -0700
          Re: Separate Rows in reader Dave Angel <davea@davea.name> - 2013-03-25 21:40 -0400
            Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-25 20:33 -0700
              Re: Separate Rows in reader MRAB <python@mrabarnett.plus.com> - 2013-03-26 03:48 +0000
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-26 00:24 -0700
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-26 00:24 -0700
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-27 02:35 -0700
                Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-27 04:18 -0700
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-27 15:12 -0700
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-27 15:26 -0700
                Re: Separate Rows in reader rusi <rustompmody@gmail.com> - 2013-03-27 18:24 -0700
                Re: Separate Rows in reader Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-28 01:32 +0000
                Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-27 02:35 -0700
                Re: Separate Rows in reader Tim Roberts <timr@probo.com> - 2013-03-28 21:28 -0700
            Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-25 20:33 -0700
  Re: Separate Rows in reader Jiewei Huang <jiewei24@gmail.com> - 2013-03-24 18:15 -0700

csiph-web