Package: pyLibrary
pyLibraryA library of wonderful Python things!MotivationThis library is born from my version of theutilslibrary every project has.
Only, instead of being utilities that are specific to the task, these utilities
are for multiple projects: They assume logs should be structured,
all data should be JSONizable, and OO is preferred, and more.Python is a Little CruftyPython is awesome now, but it was originally a procedural language invented
before pure functional semantics, before OO, and even before the
discovery of vowels.  As a consequence there are many procedures that alter
their own parameters, or have disemvoweled names.  This library puts a facade
over these relics of the past and uses convention to name methods.Installing pyLibraryPython packages are easy to install, assuming you have Python (see below).pip install pyLibraryInstalling for DevelopmentDownload from Github:git clone https://github.com/klahnakoski/pyLibrary.gitInstall requirements:python setup.py developWindows 7 Install Instructions for PythonUpdated November 2014, for Python 2.7.8Python was really made for Linux, and installation will be easier there.
Technically, Python works on Windows too, but there are a few gotchas you can
avoid by following these instructions.Download Python 2.732bit ONLY!!! Many native libs are 32 bitVarsion 2.7.8 or higher (includes pip, so install is easier)Install Python atc:\Python27(The space in the "Program Files" may screw up installs of native libs)Add to you path:c:\Python27;c:\Python27\scripts;Downloadhttps://bootstrap.pypa.io/get-pip.pyCALL python get-pip.py
CALL pip install virtualenvMany "Python Powered" native installs require a pointer to the python installation, but they have no idea where to
look in 64bit windows.  You must alter the registry (http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows):SET HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath = "C:\Python27"###Using virtualenvvirtualenvallows you to have multiple python projects on the same
machine, even if they use different versions of the same libraries.virtualenvdoes this by making a copy of the main python directory and
using it to hold the specific versions required.New environment:virtualenv <name_of_dir>Activate environment:<name_of_dir>\scripts\activateExit environment:deactivateIf you have more than one project on your dev box I suggest you do all your
work inside a virtual environment.PyPy and Virtual Environmentsvirtualenvcan be used with PyPy, but it is a bit more involved.  The
paths must be explict, and some copying is required.New environment:The first call to virtualenv will make the directory, to which you copy the
PyPy core libraries, and the second call finishes the install.c:\PyPy27\bin\virtualenv <name_of_dir>
copy c:\PyPy27\bin\lib_pypy <name_of_dir>
copy c:\PyPy27\bin\lib_python <name_of_dir>
c:\PyPy27\bin\virtualenv <name_of_dir>Activate environment:With CPythonvirtualenvplaces it's executables inScripts.  The
PyPy version usesbin<name_of_dir>\bin\activateUsing PIP in PyPy:PyPy does not share any libraries with CPython.  You must install the PyPy libraries usingC:\pypy\bin\pip.exeThepipfound in your%PATH%probably points toC:\python27\Scripts\pip.exe.Using PIP in PyPy virtualenv:DoNOTuse the<name_of_dir>\Scriptsdirectory: It installs to your
main PyPy installation.  Pip install is done using thebindirectory:<name_of_dir>\bin\pip.exeExit environment:Deactivation is like normaldeactivateCPython Binaries and Virtual EnvironmentsIf you plan to use any binary packages,virtualenvwill not work
directly.  Instead, install the binary (32 bit only!!) to the main python
installation.  Then copy any newly installed files/directories fromC:\Python27\Lib\site-packagesto<name_of_dir>\Lib\site-packages.Binaries and PyPyThis strategy for installing binaries into Virtual Environments is almost
identical to installing binaries into your PyPy environment: Install Numpy
and Scipy to your CPython installation using a windows installer (which has
pre-compiled binaries), and then copy theC:\Python27\Lib\site-packages\<package>toc:\PyPy\site-packages\; note lack ofLibsubdirectory.