In <bp0lohf7aq...@mid.individual.net> notbob <not...@nothome.com> writes:
> On 2014-03-20, Zachary Ware <zachary.ware+pyl...@gmail.com> wrote: > > If you're specifying the interpreter in your command (by calling > > "python <scriptname>.py", etc), the shebang won't mean anything > > anyway. > DOH! > I was following you, fine, until that last sentence. Then how should > I invoke the scripts? ....as your example is exactly how I've been > doing it with 2.7, as per Learn Python the Hard Way. Simply > ./<scriptname>.py from the appropriate directory (assuming I keep both > vers in separate dirs)? There are two ways (at least!) to run a python script: 1. Execute the python interpreter manually, supplying the python script name as an arugment, like so: python myscript.py python2 otherscript.py python3 yetanotherscript.py This lets you choose on-the-fly which version of python is being used to interpret the script. 2. Execute the python script directly by just typing its name, like so: myscript.py ./otherscript.py /other/directory/yetanotherscript.py Depending on your operating system, this may require: a. Permissions on the script file be set to allow execution; b. A 'shebang' entry as the first line in the file which specifies the program that shall be executed; -- John Gordon Imagine what it must be like for a real medical doctor to gor...@panix.com watch 'House', or a real serial killer to watch 'Dexter'. -- https://mail.python.org/mailman/listinfo/python-list