Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29411
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'elif': 0.04; 'essentially': 0.04; 'subject:Python': 0.05; 'newbie': 0.05; 'python': 0.09; 'cmd': 0.09; 'sys.exit(2)': 0.09; 'terry': 0.09; 'cc:addr:python-list': 0.10; '"import': 0.16; 'reedy': 0.16; 'subject:windows': 0.16; 'sys.exit(1)': 0.16; 'string': 0.17; 'wrote:': 0.17; 'processor': 0.17; 'windows': 0.19; 'followed': 0.20; 'putting': 0.20; 'cc:2**0': 0.23; 'work.': 0.23; "haven't": 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'converting': 0.27; 'lines': 0.28; 'archives': 0.29; 'idea,': 0.29; 'spaces': 0.29; 'words': 0.29; "i'm": 0.29; 'aside': 0.32; 'could': 0.32; 'like:': 0.33; 'problem': 0.33; 'wrong': 0.34; 'pm,': 0.35; 'something': 0.35; 'but': 0.36; 'method': 0.36; 'should': 0.36; 'does': 0.37; 'uses': 0.37; 'quite': 0.37; 'files': 0.38; 'some': 0.38; 'received:192': 0.39; 'easily': 0.39; 'hello,': 0.39; 'little': 0.39; 'received:192.168': 0.40; 'most': 0.61; 'header:Reply-To:1': 0.68; 'believe': 0.69; 'received:74.208': 0.71; 'smith': 0.71; 'reply- to:no real name:2**0': 0.72; 'escaping': 0.84; 'miserable': 0.84; 'received:74.208.4.194': 0.84 |
| Date | Tue, 18 Sep 2012 01:16:25 -0400 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
| MIME-Version | 1.0 |
| To | Terry Reedy <tjreedy@udel.edu> |
| Subject | Re: 'indent'ing Python in windows bat |
| References | <mailman.3021.1347928001.27097.python-list@python.org> <5057C990.8080809@invtools.com> <k38vl8$u02$2@ger.gmane.org> |
| In-Reply-To | <k38vl8$u02$2@ger.gmane.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:aRVDUFEClqv/QTPDpsjN8CGA06UYywk0s48ApBp39m6 K2kQioyRtzPXweziRg0jQAKro96BPiC8bCL4ZMOJlDo0InQPgS uHBWqpaf3blF++iI/Duowlo3hknWjfQ9Or5ye+2ms1jRnzSEed XXEU7YyVCHuuxq8TfVBLXR2Otl21sYfJgJK4Sduk7+X9p9IQro UVn6XliN5Yn0d8NGqYJGTK/9VtBTkdbcGp3Kjm23DFT38mKe5k 8ZeTRK8ySjXOhYgRoutDCZzNIBNZqhrFEhQZ8Hxa1B4MskWCTw 4GUd9y/JdDA65P2wj4hsM9lLIs56IcgY83dJtYVlbpxXn9Hyw= = |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.860.1347945408.27098.python-list@python.org> (permalink) |
| Lines | 30 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1347945408 news.xs4all.nl 6890 [2001:888:2000:d::a6]:42446 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:29411 |
Show key headers only | View raw
On 09/18/2012 01:08 AM, Terry Reedy wrote: > On 9/17/2012 9:08 PM, David Smith wrote: >> Hello, I'm essentially a newbie in Python. >> My problem in searching the archives is not knowing what words to use to >> ask. >> >> I'm converting windows bat files little by little to Python 3 as I find >> time and learn Python. >> The most efficient method for some lines is to call Python like: >> python -c "import sys; sys.exit(3)" >> >> How do I "indent" if I have something like: >> if (sR=='Cope'): sys.exit(1) elif (sR=='Perform') sys.exit(2) else >> sys.exit(3) > > Quite aside from whether this is good idea, I believe putting \n > followed by spaces or \t in the quoted string should work. It does for > exec. > Don't forget, the OP uses Windows. Last I looked, the cmd processor had miserable escaping features. But I could easily be wrong -- I haven't used Windows deliberately for quite a while now. -- DaveA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: 'indent'ing Python in windows bat Dave Angel <d@davea.name> - 2012-09-18 01:16 -0400
csiph-web