473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

#!/usr/bin/env python vs. #!/usr/bin/python

On UNIX, some people use
#!/usr/bin/env python

While other use
#!/usr/bin/python

Why is one preferred over the other one ?

Thanks.

--
Yves.
http://www.SollerS.ca
Jun 27 '08 #1
48 2659
Yves Dorfsman <yv**@zioup.comwrites:
On UNIX, some people use
#!/usr/bin/env python

While other use
#!/usr/bin/python
You haven't indicated your understanding of what the difference in
meaning is, so I'll explain it for those who might not know.

The shebang line (the initial line of the file beginning with "#!")
takes advantage of OS kernels that determine how to execute a file
based on the first few bytes of the file. The shebang line tells the
kernel that this file should be executed by passing it as input to
a process started by another command.

The specified command takes the form of a fully-qualified file path,
and zero or one arguments to the program. That command is then
executed by the kernel, and the Python program file is passed as input
to the resulting process.

The difference between the two is thus what command is executed to
interpret the Python program.

* "#! /usr/bin/env python" will run the command "/usr/bin/env python".
The 'env(1)' manual page says its purpose is to "run a program in a
modified environment", but it also has the effect that the command
is searched on the current PATH variable, and executed based on the
first occurrence.

* "#! /usr/bin/python" will run the command "/usr/bin/python", which
is of course the system Python instance as installed by most OS
packaging systems. That command is run, and the result is the Python
interpreter.
Why is one preferred over the other one ?
I've never clearly understood why people want to use "#! /usr/bin/env
python", which is prone to finding a different Python from the one
installed by the operating system. I'd be interested to see what
responses are in favour of it, and what the reasoning is.

One possible reason is that the programmer is attempting to allow for
systems where Python has been installed, but not from an operating
system package.

I much prefer "#! /usr/bin/python" because I want my Python programs
to, by default, be run with the default Python, and depend on Python
being installed by the operating system's package manager. On systems
that use shebang lines and that actually have standardised filesystem
locations, the default Python is found at '/usr/bin/python'.

--
\ "Any sufficiently advanced bug is indistinguishable from a |
`\ feature." —Rich Kulawiec |
_o__) |
Ben Finney
Jun 27 '08 #2
In article <87************@benfinney.id.au>,
Ben Finney <bi****************@benfinney.id.auwrote:
I've never clearly understood why people want to use "#! /usr/bin/env
python", which is prone to finding a different Python from the one
installed by the operating system. I'd be interested to see what
responses are in favour of it, and what the reasoning is.

One possible reason is that the programmer is attempting to allow for
systems where Python has been installed, but not from an operating
system package.
You've got it exactly.

I'm currently using Python to write unit tests as part of a build system.
Many of our development boxes don't have python installed in /usr/bin (or
perhaps at all). And even if they did, we might want to use a different
version of Python on different branches of the code.

We've got Python built for all our platforms and the binaries stored in our
source control system. When you check out a particular branch, you get the
right version of Python for that branch. By having the Python scripts
start with #!/usr/bin/env python, I can select the version of Python I want
just by changing the environment.

Then, of course, I recently ran across a machine where env was installed in
/opt/gnu/bin instead of /usr/bin. Sigh. Sometimes you just can't win.
Jun 27 '08 #3
On Fri, 02 May 2008 13:24:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
I much prefer "#! /usr/bin/python" because I want my Python programs
to, by default, be run with the default Python, and depend on Python
being installed by the operating system's package manager. On systems
that use shebang lines and that actually have standardised filesystem
locations, the default Python is found at '/usr/bin/python'.
You have lived a sheltered life. Not every packaging system puts the
executible in /usr/bin. Many systems use /usr/local/bin. NetBSD
uses /usr/pkg/bin but allows you to define your own pkg root.
Using /usr/bin/env allows your code to run on all these systems.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #4
-On [20080502 05:26], Ben Finney (bi****************@benfinney.id.au) wrote:
>I've never clearly understood why people want to use "#! /usr/bin/env
python", which is prone to finding a different Python from the one
installed by the operating system. I'd be interested to see what
responses are in favour of it, and what the reasoning is.
Simple, some systems are not as peculiar as a lot of Linux boxes which
chug everything into /usr/bin, which is OS territory (as has been decreed
long ago by hier(7)), but rather use /usr/local/bin (all BSD Unix and
derivatives) or /opt or whatever convention a particular operating system
has.

And prone to find the wrong Python, it all depends upon proper $PATH
administration.

As such, your script with #!/usr/bin/python is as bad as an ash shell script
with #!/bin/bash. #!/usr/bin/env python is more cross-OS friendly, there's
more than just Linux you know.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org/ asmodai
イェルーン ラウフ*ック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
I dream of Love as Time runs through my hand...
Jun 27 '08 #5
Yves Dorfsman <yv**@zioup.comwrote:
>
On UNIX, some people use
#!/usr/bin/env python

While other use
#!/usr/bin/python

Why is one preferred over the other one ?
The /usr/bin/env solution finds the Python interpreter anywhere on the
PATH, whether it be /usr/bin or /usr/local/bin, or whatever. With
/usr/bin/python, it MUST be in /usr/bin.

Way back when, Python wasn't included in Linux distributions by default, so
it was difficult to predict where it would be. /usr/bin/env, on the other
hand, is well-established at that location.

These days, since Python is nearly ubiquitous, I suspect it is not so
important.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jun 27 '08 #6
Jeroen Ruigrok van der Werven <as*****@in-nomine.orgwrites:
-On [20080502 05:26], Ben Finney (bi****************@benfinney.id.au) wrote:
I've never clearly understood why people want to use "#!
/usr/bin/env python", which is prone to finding a different Python
from the one installed by the operating system. I'd be interested
to see what responses are in favour of it, and what the reasoning
is.

Simple, some systems are not as peculiar as a lot of Linux boxes
which chug everything into /usr/bin, which is OS territory (as has
been decreed long ago by hier(7)), but rather use /usr/local/bin
(all BSD Unix and derivatives) or /opt or whatever convention a
particular operating system has.
To my mind, the Python interpreter installed by a package as
distributed with the OS *is* OS territory and belongs in /usr/bin/.
As such, your script with #!/usr/bin/python is as bad as an ash
shell script with #!/bin/bash.
Clearly if the program is written to be interpreted by the Ash shell,
it should not declare Bash as the interpreter.

I don't see how declaring Python as the interpreter for a Python
program is supposed to be "as bad" as that.

--
\ "Don't be afraid of missing opportunities. Behind every failure |
`\ is an opportunity somebody wishes they had missed." -- Jane |
_o__) Wagner, via Lily Tomlin |
Ben Finney
Jun 27 '08 #7
"D'Arcy J.M. Cain" <da***@druid.netwrites:
On Fri, 02 May 2008 13:24:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
I much prefer "#! /usr/bin/python" because I want my Python
programs to, by default, be run with the default Python, and
depend on Python being installed by the operating system's package
manager. On systems that use shebang lines and that actually have
standardised filesystem locations, the default Python is found at
'/usr/bin/python'.

You have lived a sheltered life. Not every packaging system puts the
executible in /usr/bin. Many systems use /usr/local/bin.
They use that for the operating-system-installed default Python
interpreter? Colour me incredulous.

--
\ “[The RIAA] have the patience to keep stomping. They’re |
`\ playing whack-a-mole with an infinite supply of tokens.” |
_o__) —kennon, http://kuro5hin.org/ |
Ben Finney
Jun 27 '08 #8
Yves Dorfsman <yv**@zioup.comwrote:
On UNIX, some people use
#!/usr/bin/env python

While other use
#!/usr/bin/python

Why is one preferred over the other one ?
I don't think the answers so far have communicated what I believe to be the
important point: it isn't that one is always better than the other, it
depends on what you are trying to achieve.

The first one runs the Python found from the environment. This means you
can write a script and expect it to run on systems configured differently.
You might prefer in some cases to specify a particular version of Python:

#!/usr/bin/env python2.5

The second one runs a specific copy of Python (and here it is even more
likely that you'll want to specify a particular version). This is important
if your program is being run as a service or some other background
situation where the environment isn't set up. For example Subversion hooks
all run with an empty environment, and cron jobs run with a default
environment which may not include python (e.g. if it is in /usr/local/bin).
Jun 27 '08 #9
-On [20080502 07:51], Ben Finney (bi****************@benfinney.id.au) wrote:
>To my mind, the Python interpreter installed by a package as
distributed with the OS *is* OS territory and belongs in /usr/bin/.
That's the difference with a distribution, such as Linux, and full OSes ,
such as BSDs or commercial Unix variants. They prefer to keep a pristine
state for the OS vendor files versus what the user can opt to install
himself, hence the /usr/bin - /usr/local/bin separation. Same for sbin, lib,
and so on. It effectively guarantees you can nuke /usr/local without ill
consequences for your OS.

Different philosophies, but after having spent more than 10+ years on too
many Unix and Unix-like systems I know the importance of platform
portability a bit too much and hardcoding a shebang sequence is not the
solution in general. Using env is the, arguably, best solution available.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org/ asmodai
イェルーン ラウフ*ック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
Felix, qui potuit rerum cognoscere causas...
Jun 27 '08 #10
Jeroen Ruigrok van der Werven <as*****@in-nomine.orgwrites:
-On [20080502 07:51], Ben Finney (bi****************@benfinney.id.au) wrote:
To my mind, the Python interpreter installed by a package as
distributed with the OS *is* OS territory and belongs in /usr/bin/.

That's the difference with a distribution, such as Linux, and full
OSes , such as BSDs or commercial Unix variants. They prefer to keep
a pristine state for the OS vendor files versus what the user can
opt to install himself, hence the /usr/bin - /usr/local/bin
separation.
Fine so far. /usr/local/ is certainly for "what the (system
administrator) user opts to install themselves".
It effectively guarantees you can nuke /usr/local without ill
consequences for your OS.
You say this as though it's a property that a GNU/Linux distribution
doesn't have. But the "keep /usr/local/ untouched by OS packages"
approach taken by GNU/Linux *also* means that /usr/local/ can be blown
away without ill consequences for the OS. So I don't see why you draw
that distinction here.

The difference seems to be that Python is an OS-installable package on
GNU/Linux, and thus gets installed to the OS-packaged location. So the
default Python installation should work.

Whereas if Python is *not* installed from an OS package, it's up to
the sys admin to ensure that it works -- not up to my program. So I
don't see the point in making it work by default, when what I want for
my program is that it works *with the default Python*, not with some
non-default installation.

--
\ "Truth is stranger than fiction, but it is because fiction is |
`\ obliged to stick to possibilities, truth isn't." -- Mark |
_o__) Twain, _Following the Equator_ |
Ben Finney
Jun 27 '08 #11
On Fri, 02 May 2008 15:50:22 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
You have lived a sheltered life. Not every packaging system puts the
executible in /usr/bin. Many systems use /usr/local/bin.

They use that for the operating-system-installed default Python
interpreter? Colour me incredulous.
OK, let me get out my crayons. However, note that I did not say
"operating-system-installed." I said a packaging system puts it
there. In fact, the NetBSD packaging system works on many systems
including Linux and thus is not an operating system packager.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #12
"D'Arcy J.M. Cain" <da***@druid.netwrites:
On Fri, 02 May 2008 13:24:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
I much prefer "#! /usr/bin/python" because I want my Python
programs to, by default, be run with the default Python, and
depend on Python being installed by the operating system's package
manager. On systems that use shebang lines and that actually have
standardised filesystem locations, the default Python is found at
'/usr/bin/python'.

You have lived a sheltered life. Not every packaging system puts the
executible in /usr/bin. Many systems use /usr/local/bin.
"D'Arcy J.M. Cain" <da***@druid.netwrites:
On Fri, 02 May 2008 15:50:22 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
They use that for the operating-system-installed default Python
interpreter? Colour me incredulous.

OK, let me get out my crayons. However, note that I did not say
"operating-system-installed."
That is, however, the context I've been explicitly using since this
sub-thread began.

The OP was asking why people prefer on over the other. My answer is
that I prefer specifying "give me the default OS Python" because
anything not installed by the OS is to non-standardised for me to
worry about.

Others may prefer something different, but then they get to wear
whatever problems occur as a result of that choice. I continue to be
bemused by that preference, and nothing that I've seen so far in this
thread illuminates the issue more.

--
\ "Nothing so needs reforming as other people's habits." -- Mark |
`\ Twain, _Pudd'n'head Wilson_ |
_o__) |
Ben Finney
Jun 27 '08 #13
* Ben Finney (Fri, 02 May 2008 23:30:01 +1000)
The OP was asking why people prefer on over the other. My answer is
that I prefer specifying "give me the default OS Python" because
anything not installed by the OS is to non-standardised for me to
worry about.

Others may prefer something different, but then they get to wear
whatever problems occur as a result of that choice. I continue to be
bemused by that preference, and nothing that I've seen so far in this
thread illuminates the issue more.
You're missing the point. Apart from the really dubious terms you use
("OS installable package"), using env in the first line has exactly the
effect to use the default path of Python (which is the first entry in
your path) and not some hard-coded path (which might not even exist).

Thorsten
Jun 27 '08 #14
In article <87************@benfinney.id.au>,
Ben Finney <bi****************@benfinney.id.auwrote:
Whereas if Python is *not* installed from an OS package, it's up to
the sys admin to ensure that it works -- not up to my program. So I
don't see the point in making it work by default, when what I want for
my program is that it works *with the default Python*, not with some
non-default installation.
Ben,

Have you ever shipped software to a customer? Imagine the following
conversation:

Customer: "Your product is broken. It says it can't find python, and I
know I have it installed".

Vendor: "Where do you have it installed?"

Customer: "In /opt/bin/python"

Vendor: "Oh, that's your problem, it HAS to be in /usr/bin/python".

Customer: "I can't install it there because <insert whatever silly reason
the customer has>. If you can't make your product work without requiring
me to install python in /usr/bin, I'm afraid I can't buy your product".

Vendor: "No problem sir, I'll be happy to tell our sales folks to stop
bothering you".

If you want to hard-code /usr/bin/python into your application, that's your
decision. If you would like to take on the task of convincing every
sysadmin in the world to do things the way you think they should be done,
have fun.
Jun 27 '08 #15
On Fri, 02 May 2008 23:30:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
The OP was asking why people prefer on over the other. My answer is
that I prefer specifying "give me the default OS Python" because
anything not installed by the OS is to non-standardised for me to
worry about.
As someone else pointed out, not all the world is Linux. So your
version of Linux (I'm not sure whether it is true for all versions or
not) delivers Python as part of the OS. That is simply not true of the
whole world. Some OS distributions have an adjunct facility for
installing packages but they are not part of the OS. Some systems
don't even have that and people must download packages such as Python
and install them manually. Even on Linux there are people who won't
install binaries and use NetBSD's pkgsrc instead. Clearly that cannot
install into /usr/bin since it is not part of the OS.

Certainly #! /usr/bin/python is fine if you never expect your software
to run outside of your own little corner of the world but you asked why
people prefer the env version and the answer is that we want to write
software that runs everywhere that Python runs.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #16
Hallchen!

D'Arcy J.M. Cain writes:
On Fri, 02 May 2008 23:30:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
>The OP was asking why people prefer on over the other. My answer
is that I prefer specifying "give me the default OS Python"
because anything not installed by the OS is to non-standardised
for me to worry about.

[...]

Certainly #! /usr/bin/python is fine if you never expect your
software to run outside of your own little corner of the world but
you asked why people prefer the env version and the answer is that
we want to write software that runs everywhere that Python runs.
Granted, but you must draw the line somewhere anyway. I cannot
pollute my program with hundreds of if clauses just to make it work
on every quirky system. It's the *systems* where the streamlining
must happen, not the programs.

Tsch,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: br*****@jabber.org
(See http://ime.webhop.org for further contact info.)
Jun 27 '08 #17
Thorsten Kampe <th******@thorstenkampe.dewrites:
* Ben Finney (Fri, 02 May 2008 23:30:01 +1000)
The OP was asking why people prefer on over the other. My answer
is that I prefer specifying "give me the default OS Python"
because anything not installed by the OS is to non-standardised
for me to worry about.

Others may prefer something different, but then they get to wear
whatever problems occur as a result of that choice. I continue to
be bemused by that preference, and nothing that I've seen so far
in this thread illuminates the issue more.

You're missing the point. Apart from the really dubious terms you
use ("OS installable package"), using env in the first line has
exactly the effect to use the default path of Python (which is the
first entry in your path)
No, because it's quite common for the PATH variable to have
'/usr/local/bin' appear *before* both of '/bin' and '/usr/bin'.

If the system has a sysadmin-installed '/usr/local/bin/python'
installed as well as the OS-installed '/usr/bin/python', then the two
shebang options the OP raised will behave differently on such a
system. This seems to be quite the point of the discussion.

--
\ "Time's fun when you're having flies." -- Kermit the Frog |
`\ |
_o__) |
Ben Finney
Jun 27 '08 #18
On 2008-05-02, Ben Finney <bi****************@benfinney.id.auwrote:
The specified command takes the form of a fully-qualified file
path, and zero or one arguments to the program. That command
is then executed by the kernel, and the Python program file is
passed as input to the resulting process.
Just to clarify that a bit a little, the name of the file (as
it was given to the "exec" system call) containing the "shebang
line" is passed to the resulting process as a command-line
parameter.
>Why is one preferred over the other one ?

I've never clearly understood why people want to use "#! /usr/bin/env
python", which is prone to finding a different Python from the one
installed by the operating system. I'd be interested to see what
responses are in favour of it, and what the reasoning is.

One possible reason is that the programmer is attempting to allow for
systems where Python has been installed, but not from an operating
system package.
Exactly. the "env" approach works as long as python is
installed somewhere on the PATH. "#!/usr/bin/python" will fail
if python is installed in /usr/local/bin/python.

--
Grant

Jun 27 '08 #19
Roy Smith <ro*@panix.comwrites:
In article <87************@benfinney.id.au>,
Ben Finney <bi****************@benfinney.id.auwrote:
Whereas if Python is *not* installed from an OS package, it's up
to the sys admin to ensure that it works -- not up to my program.
So I don't see the point in making it work by default, when what I
want for my program is that it works *with the default Python*,
not with some non-default installation.

Ben,

Have you ever shipped software to a customer?
Yes, and all parties have been quite happy with the results.
Imagine the following conversation:

Customer: "Your product is broken. It says it can't find python, and
I know I have it installed".

Vendor: "Where do you have it installed?"

Customer: "In /opt/bin/python"

Vendor: "Oh, that's your problem, it HAS to be in /usr/bin/python".
At this point the vendor isn't me, because this statement isn't true.
See below.
Customer: "I can't install it there because <insert whatever silly
reason the customer has>. If you can't make your product work
without requiring me to install python in /usr/bin, I'm afraid I
can't buy your product".
At this point they have the simple option of running the program with
'python /path/to/the/program'. It's certainly not a case of "can't
make the product work".

It is, however, a case of "can't automatically account for every local
customisation sysadmins choose to make on their systems". Perfectly
willing to work with them to get their specific environment working,
but as a matter of simple economics it's not worth my time to attempt
to make such corner cases work automatically.
If you want to hard-code /usr/bin/python into your application,
that's your decision. If you would like to take on the task of
convincing every sysadmin in the world to do things the way you
think they should be done, have fun.
If they've already chosen to install Python to some unpredictable
location, they know what they're doing enough to invoke the program in
a specific way to get it working.

--
\ Rommel: "Don't move, or I'll turn the key on this can of Spam!" |
`\ -- The Goon Show, _Rommel's Treasure_ |
_o__) |
Ben Finney
Jun 27 '08 #20
"D'Arcy J.M. Cain" <da***@druid.netwrites:
On Fri, 02 May 2008 23:30:01 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
The OP was asking why people prefer on over the other. My answer
is that I prefer specifying "give me the default OS Python"
because anything not installed by the OS is [too] non-standardised
for me to worry about.

As someone else pointed out, not all the world is Linux.
It's a good thing I've never implied such to be the case.

--
\ "If nature has made any one thing less susceptible than all |
`\ others of exclusive property, it is the action of the thinking |
_o__) power called an idea" -- Thomas Jefferson |
Ben Finney
Jun 27 '08 #21
On 2008-05-02, Jeroen Ruigrok van der Werven <as*****@in-nomine.orgwrote:
>>I've never clearly understood why people want to use "#! /usr/bin/env
python", which is prone to finding a different Python from the one
installed by the operating system. I'd be interested to see what
responses are in favour of it, and what the reasoning is.

Simple, some systems are not as peculiar as a lot of Linux boxes which
chug everything into /usr/bin, which is OS territory
On many Linux distros, Python is pretty much part of the OS.
Since the early days of RedHat, Python has been part of the
base/minimum install since a lot of the "required" system
utilities were written in python. In Redhat, the package
manger was originally written in Python, so Python had to be in
"OS territory".
(as has been decreed long ago by hier(7)), but rather use
/usr/local/bin (all BSD Unix and derivatives) or /opt or
whatever convention a particular operating system has.
In the Linux world, /usr/local/bin and /opt are for stuff
installed by the user, not stuff that is an integral, required
part of the OS distribution.

--
Grant

Jun 27 '08 #22
On 2008-05-02, Jeroen Ruigrok van der Werven <as*****@in-nomine.orgwrote:
-On [20080502 07:51], Ben Finney (bi****************@benfinney.id.au) wrote:
>>To my mind, the Python interpreter installed by a package as
distributed with the OS *is* OS territory and belongs in /usr/bin/.

That's the difference with a distribution, such as Linux, and full OSes ,
such as BSDs or commercial Unix variants. They prefer to keep a pristine
state for the OS vendor files
Python _is_ an OS vendor file in the Linux world.
versus what the user can opt to install himself,
Traditionally, Python has not been optional.
hence the /usr/bin - /usr/local/bin separation. Same for sbin,
lib, and so on. It effectively guarantees you can nuke
/usr/local without ill consequences for your OS.
That's the point. You _couldn't_ nuke Python and have your
system keep running. That's why it was in /usr/bin.

--
Grant

Jun 27 '08 #23
On Fri, 02 May 2008 16:26:51 +0200
Torsten Bronger <br*****@physik.rwth-aachen.dewrote:
Certainly #! /usr/bin/python is fine if you never expect your
software to run outside of your own little corner of the world but
you asked why people prefer the env version and the answer is that
we want to write software that runs everywhere that Python runs.

Granted, but you must draw the line somewhere anyway. I cannot
No one is talking about if statements here.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #24
Hallchen!

D'Arcy J.M. Cain writes:
On Fri, 02 May 2008 16:26:51 +0200
Torsten Bronger <br*****@physik.rwth-aachen.dewrote:
>>Certainly #! /usr/bin/python is fine if you never expect your
software to run outside of your own little corner of the world
but you asked why people prefer the env version and the answer
is that we want to write software that runs everywhere that
Python runs.

Granted, but you must draw the line somewhere anyway. I cannot

No one is talking about if statements here.
Sorry to become laconical, but your reply was so, too:
http://en.wikipedia.org/wiki/Abstraction

Tsch,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: br*****@jabber.org
(See http://ime.webhop.org for further contact info.)
Jun 27 '08 #25
On Sat, 03 May 2008 00:44:00 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
"D'Arcy J.M. Cain" <da***@druid.netwrites:
As someone else pointed out, not all the world is Linux.

It's a good thing I've never implied such to be the case.
You haven't *said* it but you have definitely *implied* it. Installing
Python in /usr/bin is not common. It is very specific to your system.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #26
On Sat, 03 May 2008 00:43:02 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
Roy Smith <ro*@panix.comwrites:
Have you ever shipped software to a customer?

Yes, and all parties have been quite happy with the results.
When some of us talk about shipping software we aren't talking about a
20 line script delivered to our uncle's construction company office. We
are talking about millions of lines of code in thousands of programs and
modules that has to run out of the box on whatever system the client
happens to run on.
Customer: "I can't install it there because <insert whatever silly
reason the customer has>. If you can't make your product work
without requiring me to install python in /usr/bin, I'm afraid I
can't buy your product".

At this point they have the simple option of running the program with
'python /path/to/the/program'. It's certainly not a case of "can't
make the product work".
Simple for your 20 line single script. Not so simple for my million
line, integrated system that has to work everywhere.
It is, however, a case of "can't automatically account for every local
customisation sysadmins choose to make on their systems". Perfectly
willing to work with them to get their specific environment working,
but as a matter of simple economics it's not worth my time to attempt
to make such corner cases work automatically.
If by "corner case" you mean "some system that I don't personally run"
then OK but to some of us your system is the corner case and we would
like our code to run there as well.

Real software has to deal with the fact that support costs money.
You may be able to deal with one or two clients that way but that does
not scale very well.
If they've already chosen to install Python to some unpredictable
location, they know what they're doing enough to invoke the program in
a specific way to get it working.
Unpredictable to you. Perfectly predictable on their system.

I do believe I am done with this thread.

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #27
On 2008-05-02, D'Arcy J.M. Cain <da***@druid.netwrote:
On Sat, 03 May 2008 00:44:00 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
>"D'Arcy J.M. Cain" <da***@druid.netwrites:
As someone else pointed out, not all the world is Linux.

It's a good thing I've never implied such to be the case.

You haven't *said* it but you have definitely *implied* it.
Installing Python in /usr/bin is not common.
It is common. That's where it's installed by almost all Linux
distributions.
It is very specific to your system.
Are you claiming that Linux is not a "common" Unix-like OS?

--
Grant

Jun 27 '08 #28
Thanks everybody, I didn't mean to start a flamewar...
I do get it now, it's whatever python is in the path, vs. the specific one
you're pointing to.

Ben Finney wrote:
>
No, because it's quite common for the PATH variable to have
'/usr/local/bin' appear *before* both of '/bin' and '/usr/bin'.

If the system has a sysadmin-installed '/usr/local/bin/python'
installed as well as the OS-installed '/usr/bin/python', then the two
shebang options the OP raised will behave differently on such a
system. This seems to be quite the point of the discussion.
And I have to admit, I prefer specifying the version (full path) because I
have run into too many problem when users have different PATHs and end up
running different version of an interpreter.

Yves.
--
http://www.SollerS.ca
Jun 27 '08 #29
* Ben Finney (Sat, 03 May 2008 00:37:45 +1000)
Thorsten Kampe <th******@thorstenkampe.dewrites:
* Ben Finney (Fri, 02 May 2008 23:30:01 +1000)
The OP was asking why people prefer on over the other. My answer
is that I prefer specifying "give me the default OS Python"
because anything not installed by the OS is to non-standardised
for me to worry about.
>
Others may prefer something different, but then they get to wear
whatever problems occur as a result of that choice. I continue to
be bemused by that preference, and nothing that I've seen so far
in this thread illuminates the issue more.
You're missing the point. Apart from the really dubious terms you
use ("OS installable package"), using env in the first line has
exactly the effect to use the default path of Python (which is the
first entry in your path)

No, because it's quite common for the PATH variable to have
'/usr/local/bin' appear *before* both of '/bin' and '/usr/bin'.

If the system has a sysadmin-installed '/usr/local/bin/python'
installed as well as the OS-installed '/usr/bin/python', then the two
shebang options the OP raised will behave differently on such a
system. This seems to be quite the point of the discussion.
Again you're missing the point. If you or whoever installs Python (or
another version of Python) to /usr/local/bin and puts this in the path
to front (as it's often done) then /you/ want that Python to be the
"default" one. It would just be silly to say "no, I the developer want
/usr/bin/python".

So in general "#! env" is better while in certain circumstance
hardcoding the path to /usr/bin/python can be better.
Thorsten
Jun 27 '08 #30
On May 2, 11:07 am, "D'Arcy J.M. Cain" <da...@druid.netwrote:
On Sat, 03 May 2008 00:43:02 +1000

Ben Finney <bignose+hates-s...@benfinney.id.auwrote:
Roy Smith <r...@panix.comwrites:
Have you ever shipped software to a customer?
Yes, and all parties have been quite happy with the results.

When some of us talk about shipping software we aren't talking about a
20 line script delivered to our uncle's construction company office. We
are talking about millions of lines of code in thousands of programs and
modules that has to run out of the box on whatever system the client
happens to run on.
If you're shipping a program that large you out to be packaging the
Python interpreter with it.

Frankly, this whole discussion is silly, as if it's some kind hard
thing to open the script with a text editor and modify the shbang
line.
Carl Banks
Customer: "I can't install it there because <insert whatever silly
reason the customer has>. If you can't make your product work
without requiring me to install python in /usr/bin, I'm afraid I
can't buy your product".
At this point they have the simple option of running the program with
'python /path/to/the/program'. It's certainly not a case of "can't
make the product work".

Simple for your 20 line single script. Not so simple for my million
line, integrated system that has to work everywhere.
It is, however, a case of "can't automatically account for every local
customisation sysadmins choose to make on their systems". Perfectly
willing to work with them to get their specific environment working,
but as a matter of simple economics it's not worth my time to attempt
to make such corner cases work automatically.

If by "corner case" you mean "some system that I don't personally run"
then OK but to some of us your system is the corner case and we would
like our code to run there as well.

Real software has to deal with the fact that support costs money.
You may be able to deal with one or two clients that way but that does
not scale very well.
If they've already chosen to install Python to some unpredictable
location, they know what they're doing enough to invoke the program in
a specific way to get it working.

Unpredictable to you. Perfectly predictable on their system.

I do believe I am done with this thread.

--
D'Arcy J.M. Cain <da...@druid.net | Democracy is three wolveshttp://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #31
Ben Finney wrote:
No, because it's quite common for the PATH variable to have
'/usr/local/bin' appear *before* both of '/bin' and '/usr/bin'.

If the system has a sysadmin-installed '/usr/local/bin/python'
installed as well as the OS-installed '/usr/bin/python', then the two
shebang options the OP raised will behave differently on such a
system. This seems to be quite the point of the discussion.
Yes, and that's the reason the env form is preferred. If someone --
either the system administrator, or the user environment, or the person
executing the program on the fly -- has changed the PATH, they did it
for a reason. If /usr/local/bin is in the PATH before /usr/bin, then
that is a deliberate choice (whether system-wide or not) to prefer
executables in /usr/local/bin to those in /usr/bin, and that is being
done for a very conscious reason. Which is why the PATH exists in the
first place, and why invoking the script with env is preferable.
--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Jun 27 '08 #32
Yves Dorfsman wrote:
On UNIX, some people use
#!/usr/bin/env python

While other use
#!/usr/bin/python

Why is one preferred over the other one ?
Caveat: I've only read *most* of this thread, so maybe someone else has already
made the following point.

It depends on the context. Ultimately, when your script is installed, it (almost
certainly) should point to the precise Python executable the installer intends
it to run on. One of the features of distutils is that it will *rewrite*
"#!/usr/bin/env python" to use the exact executable that the installer used to
execute the setup.py.

So *as a developer* I recommend writing your scripts with "#!/usr/bin/env
python". This lets distutils select the correct executable, and it lets your
users play around with your scripts prior to installation without needing to
rewrite the shebang line manually. I hate trying out someone's code just to find
that that they hardcoded /usr/local/bin/python2.3. If you aren't using distutils
to install for some reason, you might want to recommend that the installer
change the shebang line in your installation instructions.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Jun 27 '08 #33
"D'Arcy J.M. Cain" <da***@druid.netwrites:
On Sat, 03 May 2008 00:43:02 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
Roy Smith <ro*@panix.comwrites:
Have you ever shipped software to a customer?
Yes, and all parties have been quite happy with the results.

When some of us talk about shipping software we aren't talking about
a 20 line script delivered to our uncle's construction company
office.
Nor was I. Thanks for the condescension and straw-man attacks, but...
I do believe I am done with this thread.
That's a relief.

--
\ “He that would make his own liberty secure must guard even |
`\ his enemy from oppression.” —Thomas Paine |
_o__) |
Ben Finney
Jun 27 '08 #34
En Fri, 02 May 2008 12:07:55 -0300, D'Arcy J.M. Cain <da***@druid.net>
escribi:
On Sat, 03 May 2008 00:43:02 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
>Roy Smith <ro*@panix.comwrites:
Have you ever shipped software to a customer?

Yes, and all parties have been quite happy with the results.

When some of us talk about shipping software we aren't talking about a
20 line script delivered to our uncle's construction company office. We
are talking about millions of lines of code in thousands of programs and
modules that has to run out of the box on whatever system the client
happens to run on.
[...]
Simple for your 20 line single script. Not so simple for my million
line, integrated system that has to work everywhere.
In that case you have a setup script, I presume. You use distutils or a
better alternative, I presume. You use the scripts= argument to setup, or
the install_scripts distutils command, I presume. The first line on your
scripts starts with #! and contains the word python somewhere, I presume.
Then, distutils will adjust that shebang line using the same python
executable that was used to run the installation.
It doesn't matter whether the line read #!/usr/bin/python, #!/usr/bin/env
python, #~/bin/python2.3 or just #!python: whatever Python was used to
install your program, that will be written as the first line on the
script, and consequentely that will be used to execute the script in the
future. So the admin (or whoever installs the system) only has to make
sure to use the right Python version from the right directory. That's all.
Plain easy, isn't it?

I can't believe some angry responses in this thread - it's just a
technical question, not about which is the best team in the [preferred
sports here] National Championship...

--
Gabriel Genellina

Jun 27 '08 #35
Ben Finney <bi****************@benfinney.id.auwrites:
The shebang line (the initial line of the file beginning with "#!")
takes advantage of OS kernels that determine how to execute a file
based on the first few bytes of the file. The shebang line tells the
kernel that this file should be executed by passing it as input to a
process started by another command.

The specified command takes the form of a fully-qualified file path,
and zero or one arguments to the program. That command is then
executed by the kernel, and the Python program file is passed as
input to the resulting process.
As was pointed out later in the thread, this description is partially
untrue. The program isn't passed as input to the interpreter.

Instead, the path to the program is appended as a command-line
argument to the interpreter. Thus the kernel starts a command of the
form:

<word after the shebang<optional single argument after the first word<path to the program>

Examples:

filename: /home/foo/bar.py
shebang line: #! /usr/bin/python
command line invoked: /usr/bin/python /home/foo/bar.py

filename: /home/foo/Makefile
shebang line: #! /usr/bin/make -f
command line invoked: /usr/bin/make -f /home/foo/Makefile

For more information on shebang processing, see
<URL:http://foldoc.org/index.cgi?shebangfor a basic description, and
<URL:http://www.in-ulm.de/~mascheck/various/shebang/for lots of gory
detail.

--
\ "There's no excuse to be bored. Sad, yes. Angry, yes. |
`\ Depressed, yes. Crazy, yes. But there's no excuse for boredom, |
_o__) ever." -- Viggo Mortensen |
Ben Finney
Jun 27 '08 #36
Hallchen!

Gabriel Genellina writes:
[...]

I can't believe some angry responses in this thread - it's just a
technical question, not about which is the best team in the
[preferred sports here] National Championship...
Well, Python-list is tunnelled to Usenet. Welcome here. ;-)

Tsch,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: br*****@jabber.org
(See http://ime.webhop.org for further contact info.)
Jun 27 '08 #37
In article <A72dnRnGiotPr4bVnZ2dnUVZ_qTinZ2d@visi>,
Grant Edwards <gr****@visi.comwrote:
On 2008-05-02, D'Arcy J.M. Cain <da***@druid.netwrote:
On Sat, 03 May 2008 00:44:00 +1000
Ben Finney <bi****************@benfinney.id.auwrote:
"D'Arcy J.M. Cain" <da***@druid.netwrites:
As someone else pointed out, not all the world is Linux.

It's a good thing I've never implied such to be the case.
You haven't *said* it but you have definitely *implied* it.
Installing Python in /usr/bin is not common.

It is common. That's where it's installed by almost all Linux
distributions.
MacOS X system python (or links to them) is in the same place.

--
-- Lou Pecora
Jun 27 '08 #38
In article <ma**************************************@python.o rg>,
Gabriel Genellina <ga*******@yahoo.com.arwrote:
>
I can't believe some angry responses in this thread - it's just a
technical question, not about which is the best team in the [preferred
sports here] National Championship...
http://www.netfunny.com/rhf/jokes/91q3/usolym.html
--
Aahz (aa**@pythoncraft.com) <* http://www.pythoncraft.com/

Help a hearing-impaired person: http://rule6.info/hearing.html
Jun 27 '08 #39
At our site we run IRIX, UNICOS, Solaris, Tru64, Linux, cygwin and
other unixy OSes.

We have python installed in a number of different places:
/bin/python
/usr/local/bin/python
/usr/bin/python
/opt/freeware/Python/Python-2.5.1/bin/python
~mataap/platform/python/python-2.5.1

So I cannot assume a single location for python. Nor for any other
tool, really. Bash for example. It may indeed be in /usr/bin on many
systems, on many others it is not.

Note the version specific install points. This allows us to switch
over easily to different versions, and keep older versions in case
they are needed. We can test new versions before cutting over to them
operationally. (This matters for tools that are still changing, like
python or bash.)

We use the very handy 'modules' package (not python modules, not
fortran modules) to adjust our paths and environment variables as
needed.

Some of the install points are determined by policy, or historical
constraints, or hardware limits, or file system layout.

Now it is true that it is easy to edit a single script to change the
hashbang line. It is not easy to change several hundred scripts, on
different machines. It is easy to adjust the environment to point to
the right python path, and have all your scripts pick it up
automatically.

Use /usr/bin/env. If env is not in /usr/bin, put a link to it there.
Jun 27 '08 #40
On 5/6/08, an************@climatechange.qld.gov.au
<an************@climatechange.qld.gov.auwrote:
At our site we run IRIX, UNICOS, Solaris, Tru64, Linux, cygwin and
other unixy OSes.

We have python installed in a number of different places:
/bin/python
/usr/local/bin/python
/usr/bin/python
/opt/freeware/Python/Python-2.5.1/bin/python
~mataap/platform/python/python-2.5.1

So I cannot assume a single location for python. Nor for any other
tool, really. Bash for example. It may indeed be in /usr/bin on many
systems, on many others it is not.

Note the version specific install points. This allows us to switch
over easily to different versions, and keep older versions in case
they are needed. We can test new versions before cutting over to them
operationally. (This matters for tools that are still changing, like
python or bash.)

We use the very handy 'modules' package (not python modules, not
fortran modules) to adjust our paths and environment variables as
needed.

Some of the install points are determined by policy, or historical
constraints, or hardware limits, or file system layout.

Now it is true that it is easy to edit a single script to change the
hashbang line. It is not easy to change several hundred scripts, on
different machines. It is easy to adjust the environment to point to
the right python path, and have all your scripts pick it up
automatically.
Looks reasonable thing to do...
>
Use /usr/bin/env. If env is not in /usr/bin, put a link to it there.
So why not put symlink to Python over there on all machines, if we can
put one (or env itself) there ?

--
regards,
Banibrata
http://www.linkedin.com/in/bdutta
Jun 27 '08 #41
2008/5/6, Banibrata Dutta <ba*************@gmail.com>:
Use /usr/bin/env. If env is not in /usr/bin, put a link to it there.

So why not put symlink to Python over there on all machines, if we can
put one (or env itself) there ?
To avoid linking all the rest of interpreters like perl, ruby, lua and dozens
of others.

--
Regards,
Wojtek Walczak
http://www.stud.umk.pl/~wojtekwa/
Jun 27 '08 #42
"Wojciech Walczak" <wo********************@gmail.comwrites:
2008/5/6, Banibrata Dutta <ba*************@gmail.com>:
Use /usr/bin/env. If env is not in /usr/bin, put a link to it there.
So why not put symlink to Python over there on all machines, if
we can put one (or env itself) there ?

To avoid linking all the rest of interpreters like perl, ruby, lua
and dozens of others.
The argument was being made from "thousands of scripts". Isn't "dozens
of symlinks" better?

--
\ "It is difficult to get a man to understand something when his |
`\ salary depends upon his not understanding it." —Upton |
_o__) Sinclair, 1935 |
Ben Finney
Jun 27 '08 #43
2008/5/6, Ben Finney <bi****************@benfinney.id.au>:
So why not put symlink to Python over there on all machines, if
we can put one (or env itself) there ?
To avoid linking all the rest of interpreters like perl, ruby, lua
and dozens of others.
The argument was being made from "thousands of scripts". Isn't "dozens
of symlinks" better?
I think that depending on /usr/bin/env is more farsighted and saves some future
headaches. Creating links in /usr/bin/ means, that you have to change them
whenever you update your software (e.g. any of your many interpreters ;-)).
Changing the "#!/usr/bin/python" into "#!/usr/bin/env python" means that you do
your job once, and you can sleep well. It also is more portable.

How was it in perl?
perl -p -i -e 's/#\!\/usr\/bin\/python/#\!\/usr\/bin\/env python/' *.py

Funny thing, I have just ls'ed /usr/bin/python on my system:
$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 24 2007-11-16 14:02 /usr/bin/python ->
/usr/local/bin/python2.5

:-)

--
Regards,
Wojtek Walczak
http://www.stud.umk.pl/~wojtekwa/
Jun 27 '08 #44
On May 6, 9:06 pm, Ben Finney <bignose+hates-s...@benfinney.id.au>
wrote:
"Wojciech Walczak" <wojtek.gminick.walc...@gmail.comwrites:
2008/5/6, Banibrata Dutta <banibrata.du...@gmail.com>:
Use /usr/bin/env. If env is not in /usr/bin, put a link to it there.
So why not put symlink to Python over there on all machines, if
we can put one (or env itself) there ?
To avoid linking all the rest of interpreters like perl, ruby, lua
and dozens of others.

The argument was being made from "thousands of scripts". Isn't "dozens
of symlinks" better?
It depends on single user vs multi user. We keep multiple versions of
packages because some software requires the older versions. Which
version do we symlink to? What if we simultaneously require access to
two different versions? For example, to keep legacy software going,
or to test updated versions while keeping operational versions
running.
What if we have shared file systems, and we have multiplatform
versions? Python for solaris, python for tru64?

In a sense, we do have dozens of "virtual" links, using the modules
package to adjust paths on the fly. This is more flexible than having
a static symlink in /usr/bin. It allows us to select on a per user,
per process, per script basis, the python we want, version, platform
etc. With a static symlink, every user/process/job gets the same
python, unless you want to flip symlinks around.

Also, every 10 years or so, each platform gets replaced, so we are
replacing platforms here every few years. And we don't always get the
same replacement system. Sure we can go in and touch up all the
scripts. But it just seems so much easier and flexible to tell a
python/bash/other script to use what you get from the path, and set
the paths.

Of course, things are different on a single user desktop system, with
its own filesystems. If you are sure where python is, and you only
have one python, and you don't mind revisiting your scripts and
editing them if things change, by all means hard code the python path
in.

A
Jun 27 '08 #45
This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specified, find 'python' from the
PATH environment, I don't really know.

Brian Vanderburg II
Jun 27 '08 #46
On Thu, 08 May 2008 07:31:17 -0400
Brian Vanderburg II <Br**************@aim.comwrote:
This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specified, find 'python' from the
PATH environment, I don't really know.
Well, I know what happened when I tried it. What happened when you
tried it?

--
D'Arcy J.M. Cain <da***@druid.net | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
Jun 27 '08 #47
D'Arcy J.M. Cain wrote:
On Thu, 08 May 2008 07:31:17 -0400
Brian Vanderburg II <Br**************@aim.comwrote:
>This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specified, find 'python' from the
PATH environment, I don't really know.

Well, I know what happened when I tried it. What happened when you
tried it?

I haven't tried it but I've seen some files like written that in the
past with just a name and no path for some other interpreter (perl or sh
probably) and didn't know what the different was or if it was even
valid. I at a windows system now so I can't try it yet.

Brian Vanderburg II
Jun 27 '08 #48
Brian Vanderburg II <Br**************@aim.comwrote:
>D'Arcy J.M. Cain wrote:
>Brian Vanderburg II <Br**************@aim.comwrote:
>>This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specified, find 'python' from the
PATH environment, I don't really know.

Well, I know what happened when I tried it. What happened when you
tried it?

I haven't tried it but I've seen some files like written that in the
past with just a name and no path for some other interpreter (perl or sh
probably) and didn't know what the different was or if it was even
valid.
It's not valid. The shebang line (#!) must specify a full path. When you
saw the lone word ("perl"), it was probably a /usr/bin/env line, just we
have been discussing.
>I at a windows system now so I can't try it yet.
*IF* you are interested in playing with Linux, most of the distributions
have bootable CDs that will bring up a full Linux environment without ever
touching your hard disk.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jun 27 '08 #49

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.