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: 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: References: Date: Wed, 22 Aug 2012 18:30:59 +0530 Subject: Re: help me debug my "word capitalizer" script From: Santosh Kumar To: Kamil Kuduk 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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?