Hi Hank, On 24 May 2011 15:15, Hank Wilkinson <hwilkin...@triad.rr.com> wrote:
> Yes, I would love to know why it doesn't work, or what I'm doing wrong. > > John-Wilkinsons-iMac:p31summerfield wilkinson$ cat hello.py > #!/usr/bin/env python > > print("Hello world") > John-Wilkinsons-iMac:p31summerfield wilkinson$ chmod +X hello.py > John-Wilkinsons-iMac:p31summerfield wilkinson$ ./hello.py > -bash: ./hello.py: Permission denied > OK you had me scratching my head for a couple of minutes, but then I tried your steps on my Ubuntu box and managed to reproduce it. The problem here is you're using +X (capital X) when setting the file execute permission. You should be using +x (lowercase x) when setting the script to be executable. Capital X will only set the file to be executable if it's **already** executable for some other user/group (which is not the case in your new script's case.) Lowercase x will set it executable full stop. Cheers Walter
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor