Sunday, January 31, 2010

Latest movies watched

Samson & Delilah: depressing but moving film. The outback setting was impressive.

Watchmen: have only read the first chapter of the original graphic novel, but quite enjoyed the film. Although it was a little slow in parts and probably a bit over-long, I enjoyed the dark feel. Special effects with Dr Manhattan were awesome and Rorschach (unmasked) in prison was cool.

setting paths for python on windows

1. Finding the python executable (python.exe). Add the directory to the windows environment variable "Path":
- right-click on "My Computer" > Properties > Advanced (tab) > Environment Variables (button).
- double-click on "Path" variable (in the System Variables box); click "Edit" button, and add directory containing python.exe (e.g. C:\Python26\)

Once this is done, should be able to run python by typing "python" in the command shell (cmd.exe).

2. Add directories to python search path (so that, e.g., import will find it). Add to the PYTHONPATH environment variable in the Windows registry:
- run regedit.exe (Start Menu > Run...)
- navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\\PythonPath\
- right-click on the "PythonPath" folder and choose "New Key". Give the key a meaningful name (e.g. PetersGeneralPythonFiles), since you may want to maintain several keys.
- right-click on the newly-created Default entry and enter the desired directory(ies) as its value.

Import statements for files in this path should now work when python is run from any location.