Dennis Lee Bieber wrote:
> Now, if you mean you store all your python programs in
> "~/pyscripts/" but you want them to run from any directory, you need to
> add "~/pyscripts/" to your login PATH definition. If you want to always
> make the local directory valid, add the "./".
Thank You. Betwee
I apologise if this is a stupid newbie error, but I've been googling
"hash bang" and "shebang" all morning. I've added the shebang to my
scripts:
#!/usr/bin/python
I've added execute permissions:
chmod +rx shebang.py
But I still can't execute my scripts by themselves
shebang.py ## produces e
John Machin wrote:
> [Michael Tobis]
> Also, with this code, you are using radius for the dimensions of the
> enclosing box, as well as the radius of the circle, so it's guaranteed
> to not to actually produce a whole circle. Recall what python does with
> negative indices!
&g
Fredrik Lundh wrote:
> "Pythor" wrote:
>
> > > You aren't getting any benefit from numpy or python here. Are you
> > > aiming for speed or legibility?
> > >
> > Speed will be a necessity, eventually. I was just really aiming for
>
Steven D'Aprano wrote:
> No, "minimum number of space characters" means "you don't use enough
> spaces", not "your variable names are too short" *wink*
>
Hmm. Guess I can't read too well.
> Within a single line, a good guideline is to leave a single space on
> either side of pluses and minuses (
Michael Tobis wrote:
> Proving yet again that it's possible to write Fortran in any language.
>
Ouch...
> You aren't getting any benefit from numpy or python here. Are you
> aiming for speed or legibility?
>
Speed will be a necessity, eventually. I was just really aiming for
something that work
John Machin wrote:
> OTTOMH, in a rush to go out: never mind Pythonic, following apply to
> any language:
> (1) accuracy: (a) sue me if I'm wrong, but I think you need range(dx+1)
> so that the dx pixel is filled in
Hmm. I think you're right. Thanks.
> (b) a few more digits after 0.71
> might be
I wrote the following code for a personal project. I need a function
that will plot a filled circle in a two dimensional array. I found
Bresenham's algorithm, and produced this code. Please tell me there's
a better way to do this.
import numpy
def circle(field=None,radius,center=(0,0),value=25
John Salerno wrote:
> Pythor wrote:
> > John Salerno wrote:
> >> John Salerno wrote:
> >>> Pythor wrote:
> >>>
> >>>> Whis is why I said carefully ;) I missed it several times myself when
> >>>> I was working on the chall
John Salerno wrote:
> John Salerno wrote:
> > Pythor wrote:
> >
> >> Whis is why I said carefully ;) I missed it several times myself when
> >> I was working on the challenge.
> >
> > Ok, frustration has set in again. I see the file name in the sourc
John Salerno wrote:
> Pythor wrote:
> > John Salerno wrote:
> >> Pythor wrote:
> >>> John Salerno wrote:
> >>>
> >>>> I'm sorry, but I'm terribly confused. Nothing seems to be working for
> >>>> me. I *think* what I
John Salerno wrote:
> Pythor wrote:
> > John Salerno wrote:
> >
> >> I'm sorry, but I'm terribly confused. Nothing seems to be working for
> >> me. I *think* what I need to pickle is an image file,
> >
> > SNIP
> >
> > Hint: Read
John Salerno wrote:
> I'm sorry, but I'm terribly confused. Nothing seems to be working for
> me. I *think* what I need to pickle is an image file,
SNIP
Hint: Read the source for that page more carefully.
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo