Quote:
Originally Posted by wallcraft
The reason for this suggestion is that under Unix a file must have "execute" permission to be used as a stand-alone command. The Mac seems to be a bit different, but I think something similar is going on. I don't know how to change permissions on a Mac, but python should still be able to execute the script directly. You should then get the usage message you are looking for.
|
You use chmod just like you do in Linux.
chmod 755 ereader2html.py
But, those scripts don't have a shebang in them. So, bash won't know how to run them. If you add the shebang it should work. Also, I have found that I needed to change the line endings to Unix type rather than the DOS type that was in the files that I downloaded.
But passing it to python should work fine even if it isn't marked executable:
python ereader2html.py
Should return a usage banner.
BOb