background preloader

Python

Facebook Twitter

Bio and Geo Informatics: k-means clustering in scipy. 2. Getting Started — Selenium Python Bindings 2 documentation. How to use Selenium with Python. Python how calculate a polygon perimeter using an osgeo.ogr.Geometry object. Installing Shapelib · sunlightlabs/polipoly Wiki. = About = pyShapeLib is the name of the python bindings for [ ShapeLib]. !

Installing Shapelib · sunlightlabs/polipoly Wiki

ShapeLib is a library for dealing with ESRI Shapefiles like the ones that the Census provides. polipoly depends on pyshapelib-0.3. = Obtaining the Sources = Unfortunately, pyShapeLib must be built from source. This requires the source of both ! The latest ! The latest pyShapeLib sources are available at = Building the Library = Extract ! Enter the shapelib-1.2.10/pyshapelib-0.3 directory and run the `python setup.py build` command followed by `python setup.py install` which will install the library into your `site-packages` If running `python setup.py build` gives errors make sure that the appropriate python-dev packages are installed on your system. Python - error: Unable to find vcvarsall.bat. Winpython - WinPython is a portable scientific Python 2/3 32/64bit distribution for Windows.

Python 2.7 - Best approach to query SQL server for numpy. The Python Tutorial — Python v2.7.5 documentation. Python is an easy to learn, powerful programming language.

The Python Tutorial — Python v2.7.5 documentation

It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.

The Python interpreter is easily extended with new functions and data types implemented in C or C++ (or other languages callable from C). This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. The Glossary is also worth going through. Numpy manual contents — NumPy v1.7 Manual (DRAFT) 8.3. collections — High-performance container datatypes — Python v2.7.5 documentation. New in version 2.4.

8.3. collections — High-performance container datatypes — Python v2.7.5 documentation

Source code: Lib/collections.py and Lib/_abcoll.py This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple. In addition to the concrete container classes, the collections module provides abstract base classes that can be used to test whether a class provides a particular interface, for example, whether it is hashable or a mapping. 19.7. xml.etree.ElementTree — The ElementTree XML API — Python v2.7.5 documentation.

The Element type is a flexible container object, designed to store hierarchical data structures in memory.

19.7. xml.etree.ElementTree — The ElementTree XML API — Python v2.7.5 documentation

The type can be described as a cross between a list and a dictionary. To create an element instance, use the Element constructor or the SubElement() factory function. The ElementTree class can be used to wrap an element structure, and convert it from and to XML. Installing GDAL (and OGR) for Python on Windows. Overview:

Installing GDAL (and OGR) for Python on Windows

Ondrej in the air: Plot polygon shapefiles using ogr and matplolib. I often need to plot polygons from ESRI shapefile in my programs.

Ondrej in the air: Plot polygon shapefiles using ogr and matplolib

Here is a small snippet that shows how to properly deal with donut like polygons i.e. polygons with islands. Part of the code is from matplotlib example. Dwtkns/gdal-cheat-sheet. MapServer and GDAL binary and SDK packages. Install GDAL on Windows at Cartometric Blog. Later posts on this blog will assume a working install of GDAL/OGR, so it’s prudent that I first demonstrate how to get a fresh cut of GDAL/OGR up-and-running on a Windows system.

Install GDAL on Windows at Cartometric Blog

Windows users have a few options for installing GDAL (see this question at gis.stackexchange,which will point you to Christoph Gohlke’s binaries –scroll down to GDAL, and the OSGeo4W Installer, among other approaches). However, I’ll guide you through what works for me, which can be summarized as follows: 1) Install Python 2) Install the GDAL binaries published by Tamas Szekeres 3) Append your environment Path variable 4) Add the GDAL_DATA environment variable 5) Finally, perform a quick test to make sure everything worked. First, Install Python (For reference purposes, I used version 2.7 for Win32): · Start at the Python homepage· At left, find “Quick Links (2.7.2)” and select “Windows Installer” · Complete the download and start the installation · Accept the default options suggested by the installer. Html - How can I retrieve the page title of a webpage using Python.