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


Groups > comp.lang.python > #46751

Re: Python #ifdef

References <BLU176-W12FAFEA3C7AFD687855E04D7970@phx.gbl> <mailman.2336.1369790616.3114.python-list@python.org> <ko54sm$c5b$2@reader1.panix.com> <mailman.2361.1369839938.3114.python-list@python.org> <n4mdnZkIOrRTRjbMnZ2dnUVZ5gOdnZ2d@giganews.com>
Date 2013-06-03 12:05 +1000
Subject Re: Python #ifdef
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2573.1370225159.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Jun 3, 2013 at 9:57 AM, Erik Max Francis <max@alcyone.com> wrote:
> On 05/29/2013 08:05 AM, Chris Angelico wrote:
>>
>> It's not a bad tool. I used it as a sort of PHP preprocessor, because
>> requirements at work had me wanting to have a source file defining a
>> PHP class and having an autogenerated section in the middle of that
>> class. PHP's 'include' directive doesn't work for that. Of course, had
>> we been using a better language, that wouldn't have been an issue (and
>> it stopped being an issue when we improved the design and stopped
>> using that class system, too, though I retained the makefile
>> directives about building .php.m4 -> .php files). But still, GNU M4 is
>>
>> a decent piece of technology.
>
>
> Agreed.  The terror that most people feel when hearing "m4" is because m4
> was associated with sendmail, not because m4 was inherently awful. It has
> problems, but you'd only encounter them when doing something _very_
> abstract.

Ah. I actually wasn't aware of m4's use with sendmail. I first met it
as the aforementioned PHP preprocessor, simply by Googling for
something along the lines of "generic preprocessor". First hit solved
my problems.

ChrisA

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


Thread

Re: Python #ifdef Dan Stromberg <drsalists@gmail.com> - 2013-05-28 18:23 -0700
  Re: Python #ifdef Grant Edwards <invalid@invalid.invalid> - 2013-05-29 14:55 +0000
    Re: Python #ifdef Chris Angelico <rosuav@gmail.com> - 2013-05-30 01:05 +1000
      Re: Python #ifdef Grant Edwards <invalid@invalid.invalid> - 2013-05-29 15:25 +0000
      Re: Python #ifdef Erik Max Francis <max@alcyone.com> - 2013-06-02 16:57 -0700
        Re: Python #ifdef Roy Smith <roy@panix.com> - 2013-06-02 20:23 -0400
        Re: Python #ifdef Skip Montanaro <skip.montanaro@gmail.com> - 2013-06-02 19:29 -0500
        Re: Python #ifdef Chris Angelico <rosuav@gmail.com> - 2013-06-03 12:05 +1000

csiph-web