I've got a couple versions of Portable Python installed on my usb thumb drive so I can tinker with it when I'm away from my main computer, or if I want to try something with a different version.
Right now its installed under 'F:\Portable Python 2.7.2.1\App\python.exe', which gets to be a handful to type over and over. Granted, command-line history and tab-completion can alleviate some of the tedium, but I was wondering if there is a correct way to set things up so that instead of having to type that entire fully-qualified name plus the script name, I could simply type 'python myscript.py' and have 'python' point to the above executable (or have 'python3' point to f:\Portable Python 3.2.1.1) - without permanently installing python on the computer.
I tried using a simple .bat file named 'python.bat' that when called executed the named file... that worked until I either a) wound up on a different machine that assigned a different drive letter to the usb stick, or b) I tried running a script that took multiple command-line arguments, which apparently didn't make it 'through' the bat file.
Just thinking out loud, in *nix-y terms, I'm guessing I need to some how set the environment variable for $PATH for the session, and then unset it when I'm done. Probably a great first useful python script, but obviously I need a little help as far as whether I'm even headed in the right direction, etc.
TIA,
Monte