What meaning is of '#!python'?
fl
rxjwg98 at gmail.com
Sat Nov 14 21:13:04 EST 2015
On Saturday, November 14, 2015 at 8:58:57 PM UTC-5, Chris Angelico wrote:
> On Sun, Nov 15, 2015 at 12:54 PM, fl <gmail.com> wrote:
> > I see an example Python code has such a line at the file beginning:
> >
> > #!python
> >
> >
> > Is there some meaning about it?
>
> It probably didn't look exactly like that. Please, when you're asking
> questions, COPY AND PASTE rather than retyping some approximation of
> what you saw.
>
> As it happens, I can tell what you're asking about - it's called a
> shebang - but I very much doubt that it was exactly what you wrote.
>
> ChrisA
Excuse me. Below is copied from the .py file:
#!python
from numpy import *
from numpy.random import *
def resample(weights):
n = len(weights)
indices = []
Thanks,
More information about the Python-list
mailing list