Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29486
| Date | 2012-09-19 08:27 -0400 |
|---|---|
| From | David Smith <davids@invtools.com> |
| Subject | Re: Re: 'indent'ing Python in windows bat |
| References | (1 earlier) <5057C990.8080809@invtools.com> <k38vl8$u02$2@ger.gmane.org> <505803A9.4000409@davea.name> <mailman.870.1347973403.27098.python-list@python.org> <k3c2st$l6l$1@r03.glglgl.gl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.913.1348057641.27098.python-list@python.org> (permalink) |
On 2012-09-19 05:22, Thomas Rachel wrote:
> Am 18.09.2012 15:03 schrieb David Smith:
>
>> 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.
>
> In order to achieve this, it might be very useful to either have a
> module for each (bigger) part to be achieved which you can call with
...
> Or you have one big "interpreter" which works this way:
>
> class Cmd(object):
> """
> Command collector
> """
...
...
>
> This is suitable for many small things and can be used this way:
...
> Thomas
Thomas,
Beautiful. Gotta love it. I'll see if I can get the "interpreter" going.
I particularly like it because I will be able to copy and paste
wholesale when I stitch the final product back together again. Many thanks.
Going back to the one-liner, I discovered the following individual lines
work:
print('hi')
if 1: print('hi')
print('hi');print('hi2')
if 1: print('hi');print('hi2')
but not:
print('hi');if 1: print('hi')
Chokes on the 'if'. On the surface, this is not consistent.
I'll drop the one-liners for now since I have something that I can work
with as I learn to wrestle with Python.
thanks again.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: 'indent'ing Python in windows bat David Smith <davids@invtools.com> - 2012-09-18 09:03 -0400
Re: 'indent'ing Python in windows bat Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-19 11:22 +0200
Re: Re: 'indent'ing Python in windows bat David Smith <davids@invtools.com> - 2012-09-19 08:27 -0400
Re: 'indent'ing Python in windows bat Terry Reedy <tjreedy@udel.edu> - 2012-09-19 14:18 -0400
Re: Re: 'indent'ing Python in windows bat David Smith <davids@invtools.com> - 2012-09-19 16:09 -0400
csiph-web