Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'broken': 0.03; 'interpreter': 0.04; 'subject:Python': 0.05; '(using': 0.07; 'escape': 0.07; 'ugly': 0.07; 'scripts': 0.09; 'python': 0.09; 'called.': 0.09; 'differently.': 0.09; 'sentence': 0.09; 'terry': 0.09; "wouldn't": 0.11; 'sections': 0.13; 'file,': 0.15; 'agree.': 0.16; 'aiming': 0.16; 'attempt.': 0.16; 'awk': 0.16; 'bash,': 0.16; 'dog': 0.16; 'happy.': 0.16; 'multitude': 0.16; 'otoh,': 0.16; 'record,': 0.16; 'reedy': 0.16; 'roy': 0.16; 'subject:windows': 0.16; 'swallowed': 0.16; 'typing': 0.17; 'thanks,': 0.18; 'windows': 0.19; 'file.': 0.20; 'trying': 0.21; 'received:209.85.214.174': 0.21; 'work,': 0.22; 'idea': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'fit': 0.26; 'question': 0.27; 'c++': 0.27; 'converting': 0.27; 'correct': 0.28; 'all.': 0.28; 'mini': 0.29; 'convert': 0.29; "i'm": 0.29; 'window': 0.30; 'button': 0.30; 'figure': 0.30; 'stuff': 0.30; 'gets': 0.32; 'file': 0.32; 'structure': 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'guys': 0.33; 'languages': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'whatever': 0.35; 'faster': 0.35; 'doing': 0.35; 'received:192.168.0': 0.35; 'too.': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'others.': 0.36; "didn't": 0.36; 'thank': 0.36; 'being': 0.37; 'why': 0.37; 'received:209': 0.37; 'far': 0.37; 'files': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'received:192': 0.39; 'called': 0.39; 'little': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'most': 0.61; 'first': 0.61; 'organization': 0.61; 'back': 0.62; 'time,': 0.62; 'different': 0.63; 'ever': 0.63; 'more': 0.63; 'cast': 0.65; 'realized': 0.71; 'smith': 0.71; 'commands.': 0.84; 'disappear': 0.84; 'eventually,': 0.84; 'high,': 0.84; 'ugly,': 0.84; 'belt': 0.91; 'dirty': 0.91; 'dozens': 0.91; 'melt': 0.91; 'have.': 0.95 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=+TnZmqX0k1VGgZHEQ8JqRpJPlrMZRI1zTZFlKSf5vrY=; b=Ts3nBjxovo7tV/iR8bu/rzgk0iWjO7VUx6zsFR1wBojKbSdI6iJ7ok+9rCwA8fRt53 kGdTQNsJ7iPWj7Y+SEXP6dYdpfPyYLngpDFPua0PO9qqLs93sFnTYPv0H0FCCqixrxaY ShHm3BV2yLLjZ+11e5DbgxYzhr0sIxaMm5lxYJtBDGoS6L9Slb2tAKZUj036ift66f6V TagRvVZ+fl6Vcw7pfeqIh+LvjOXxhu6nDdr4Va5kNqm9IpZRmxQxSl5x/Cawujd3eTsi 9tNDXTapLWUERzzFhuz2DgWfPGVmOnTdyg0qoqKsH+ocmQW0dfzVaEwajw5b9VpHooBH JAHg== Date: Tue, 18 Sep 2012 09:03:19 -0400 From: David Smith User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: 'indent'ing Python in windows bat References: <5057C990.8080809@invtools.com> <505803A9.4000409@davea.name> In-Reply-To: <505803A9.4000409@davea.name> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkx3EyTrXKwlafGbyCgX1dm81x0emOscCBVjUZoZ4r0o4IC7Egu9eFFzgMQ7Sp0rMjuVvz4 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347973403 news.xs4all.nl 6852 [2001:888:2000:d::a6]:51720 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29427 Thank you all. Roy Smith gets the most thanks, though he didn't answer my general question -- he showed me how to look at that specific structure differently. Terry Reedy might get thanks for her idea if I can ever figure the correct escape sequences that will make both windows and the Python interpreter happy. Bat makes bash/sed combos look like a breeze... I thought you guys wouldn't want a treatise about WHY I was doing it this way and left it at one sentence. For whatever record, this is the sentence most missed. > I'm converting windows bat files little by little to Python 3 as I find time and learn Python. I COULD stop doing all my other work to learn Python and convert all the batch files in one fell swoop. Efficiency? Fast way to get fired. Better to fit this in during the many small breaks I have. That's how the bat files were built over time in the first place. Or this email. I COULD break down each batch file and write dozens of mini python scripts to be called. I already have a few, too. Efficiency? Speed is bad, but these are bat files, after all. The cost of trying to work with a multitude of small files is high, though, and I realized I had better go to a mix. Some sections can be broken down to one liners. Efficiency? Speed is terrible, but it's far faster than typing commands. OTOH, I have the organization I need on the original bat file, which is slowly being rem'ed out. As I learn and have the time, the one-liners will melt together into a py file to be called from the bat file. Eventually, the bat will disappear back into the broken Window from whence it came. Ugly, eh? I have under my belt scads of different languages from Fortran (using JCL!), Pascal, C++ to bash, sed, awk to Forth, assembly and a large cast of others. No big deal. My brain and Python, however, do NOT mix. I have been trying to learn the thing for over a decade and figure this will either force my brain into seeing the heart of the beast, or be swallowed in the attempt. Bat files are ugly cripples, but even on Windows a two-legged quick and dirty dog is better than mistake-prone typing and button clicking. After conversion, I'm aiming to make these erstwhile ugly cripples fly when I find the time and as I stuff more Python down my gullet. I agree. For those who have the unbroken time and understanding of Python, this is idiotic. back to work,