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


Groups > comp.lang.python > #27631

Re: help me debug my "word capitalizer" script

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <sntshkmr60@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'escape': 0.07; 'subject:help': 0.07; 'received:mail-vc0-f174.google.com': 0.09; 'subject:script': 0.09; 'bug': 0.10; 'cc:addr:python-list': 0.10; 'andreas': 0.16; 'ok!': 0.16; 'fixed.': 0.17; 'skip': 0.17; 'input': 0.18; 'changes': 0.20; 'this:': 0.23; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'cc:addr:gmail.com': 0.27; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.220.174': 0.29; 'character': 0.29; 'words': 0.29; 'file': 0.32; 'word.': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'subject:" ': 0.36; 'possible': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'first': 0.61; '#2:': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NszJbXDvJ05TIbeaMUBmERAd6VXEU3Kb1++ZNf9F6yo=; b=eAi+snn43Oq8XFS9ix7DL/HrC6Bjkcwk2pfYGwYxXiRyaQBnUSFRcIZAbje9yDJog7 +TO4z6JGNukTMSybvZW6ITa2iZaof7us2li2rTbDA74b19L99qCzrdfBdzOGCRloUvwa 5+EP0wiED4HELrsnsR1kVHUwQkEs5ovup8cOqiiy1XPAJSM8tEonAeG+EBkieTemOZZG pbJfKTJVWmH815nTHYjsCkyZNJwJOl0qUL5akF5w7GUoyaEUV4BmphrsevJk6jAHnXSF qltrftWPhWut5Q7bMoVhldK3g4CD4yX13QHMnR5FaIZu01CYL0MMlZdDAOqaB88D4VJy Nrzw==
MIME-Version 1.0
In-Reply-To <CAEtwbM2MZ9D_dwv0EYXF8h5G=ucOjVm33Y3Z+E=aMY1fr17Nxw@mail.gmail.com>
References <CAE7MaQbrdVbbFWDJ8GHuoybT2SNPfZyyMFU_beBc_zMKpBHPFg@mail.gmail.com> <CAEtwbM0PwcSb6v5MZ=Dr3s9TVFoXzCOywd=JfWFfBUcM-RFLcQ@mail.gmail.com> <CAPTjJmr7JqsDx6ypjVODTvy315fFYZacNgns60QXmM+zJ5p+Xw@mail.gmail.com> <CAEtwbM2MZ9D_dwv0EYXF8h5G=ucOjVm33Y3Z+E=aMY1fr17Nxw@mail.gmail.com>
Date Wed, 22 Aug 2012 18:30:59 +0530
Subject Re: help me debug my "word capitalizer" script
From Santosh Kumar <sntshkmr60@gmail.com>
To Kamil Kuduk <kamil.kuduk@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.3647.1345640467.4697.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1345640467 news.xs4all.nl 6905 [2001:888:2000:d::a6]:42999
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27631

Show key headers only | View raw


OK! The bug one fixed. Thanks to Andreas Perstinger.

Let's move to Bug #2:
 2. How do I escape the words that are already in uppercase? For example:

The input file has this:
NASA

The script changes this to:
Nasa

Is it possible to make this script look at a word, see if its first
character is capitalized, if capitalized then skip that word. If not
do the processing? I don't wan to use regex? Do I need it?

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


Thread

Re: help me debug my "word capitalizer" script Santosh Kumar <sntshkmr60@gmail.com> - 2012-08-22 18:30 +0530
  Re: help me debug my "word capitalizer" script Rebelo <puntabluda@gmail.com> - 2012-08-22 07:46 -0700
    Re: help me debug my "word capitalizer" script Terry Reedy <tjreedy@udel.edu> - 2012-08-22 13:40 -0400
  Re: help me debug my "word capitalizer" script Rebelo <puntabluda@gmail.com> - 2012-08-22 07:46 -0700

csiph-web