Re: what is the best way to determine system OS?
- From: claird@xxxxxxxxx (Cameron Laird)
- Date: Mon, 25 Apr 2005 17:08:04 GMT
In article <868y37osc7.fsf@xxxxxxxxxxxxxx>, Mike Meyer <mwm@xxxxxxxxx> wrote:
.
.
.
>Anyway, checking the system name is the wrong way to build portable
>programs. For one thing, as you've discovered, new systems won't work
>properly. For another, upgrades to existing systems may break things
>as well.
>
>What you should do instead is check on how to use the features you
>want. If you watch a typical autoconf script, you'll see it groveling
>through libraries, include files, and various directories looking for
>subroutines, defines and commands. That's the idea, but without
>knowing which features you're looking for, I can't say how you would
>check for them.
>
>This takes more time to write, but results in more robust code. For
>instance, if some distribution changes one of the features to mimic a
>"better" distribution that you already support, instead of your script
>breaking, it'll just work. This is much better than having to teach
>your script how to distinguish between versions of distributions.
.
.
.
Not for me.
Well, not absolutely. I have a load of respect for you, Mike, and there
certainly are amazing edifices built on autoconf. Also, I think it's an
important part of our engineering to understand the principle of groveling
around interrogating capabilities; among other things, it's good practice
for duck typing and idiomatic Python exception style. I'm very
uncomfortable, though, with an assertion that reliance on a fixed table of
attributes is always wrong.
Briefly, use of autoconf is FAR from a guarantee that everything works
right when starting with a new flavor.
.
- Follow-Ups:
- Re: what is the best way to determine system OS?
- From: Mike Meyer
- Re: what is the best way to determine system OS?
- References:
- what is the best way to determine system OS?
- From: googleboy
- Re: what is the best way to determine system OS?
- From: Mike Meyer
- what is the best way to determine system OS?
- Prev by Date: Dr. Dobb's Python-URL! - weekly Python news and links (Apr 25)
- Next by Date: Re: PyGTK vs. wxPython
- Previous by thread: Re: what is the best way to determine system OS?
- Next by thread: Re: what is the best way to determine system OS?
- Index(es):
Relevant Pages
|