• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email


src/p/y/py_examples-HEAD/opencv/CVtypes.py   py_examples(Download)
 
import ctypes, os
from ctypes import Structure, Union, POINTER, SetPointerType, CFUNCTYPE, cdll, byref
from ctypes import c_char_p, c_double, c_float, c_byte, c_ubyte, c_int, c_void_p, c_ulong
from ctypes import c_uint32, c_short, c_char, c_longlong
 
# ----Load the DLLs ----------------------------------------------------------

src/p/y/pypy-HEAD/pypy/lib/sqlite3/dbapi2.py   pypy(Download)
#    misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.
 
from ctypes import c_void_p, c_int, c_double, c_int64, c_char_p, cdll
from ctypes import POINTER, byref, string_at, CFUNCTYPE, cast
import datetime
import sys
            try:
                sql = "BEGIN " + self._isolation_level
                statement = c_void_p()
                next_char = c_char_p()
                ret = sqlite.sqlite3_prepare_v2(self.db, sql, -1, byref(statement), next_char)
                if ret != SQLITE_OK:
                    raise self._get_exception(ret)
        try:
            sql = "COMMIT"
            statement = c_void_p()
            next_char = c_char_p()
            ret = sqlite.sqlite3_prepare_v2(self.db, sql, -1, byref(statement), next_char)
            if ret != SQLITE_OK:
                raise self._get_exception(ret)
        try:
            sql = "ROLLBACK"
            statement = c_void_p()
            next_char = c_char_p()
            ret = sqlite.sqlite3_prepare_v2(self.db, sql, -1, byref(statement), next_char)
            if ret != SQLITE_OK:
                raise self._get_exception(ret)
        self.connection._check_closed()
        self.connection._check_thread()
        statement = c_void_p()
        next_char = c_char_p(sql)
 
        while True:
            if not sqlite.sqlite3_complete(next_char):
        self.exhausted = False
 
        self.statement = c_void_p()
        next_char = c_char_p()
        ret = sqlite.sqlite3_prepare_v2(self.con.db, sql, -1, byref(self.statement), byref(next_char))
        if ret == SQLITE_OK and self.statement.value is None:
            # an empty statement, we work around that, as it's the least trouble

src/c/0/c.seungjin.net-HEAD/lib/python2.5/site-packages/django/contrib/gis/gdal/geometries.py   c.seungjin.net(Download)
# Python library requisites.
import sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
 
# Getting GDAL prerequisites
from django.contrib.gis.gdal.base import GDALBase
                    # OGR_G_CreateFromWkt doesn't work with LINEARRING WKT.
                    #  See http://trac.osgeo.org/gdal/ticket/1992.
                    g = capi.create_geom(OGRGeomType(wkt_m.group('type')).num)
                    capi.import_wkt(g, byref(c_char_p(wkt_m.group('wkt'))))
                else:
                    g = capi.from_wkt(byref(c_char_p(wkt_m.group('wkt'))), None, byref(c_void_p()))
            elif json_m:
    def wkt(self):
        "Returns the WKT representation of the Geometry."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
 
    @property
    def ewkt(self):
        "Returns the EWKT representation of the Geometry."

src/r/e/reporter-lib-HEAD/packages/Django/django/contrib/gis/gdal/geometries.py   reporter-lib(Download)
# Python library requisites.
import sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
 
# Getting GDAL prerequisites
from django.contrib.gis.gdal.base import GDALBase
                    # OGR_G_CreateFromWkt doesn't work with LINEARRING WKT.
                    #  See http://trac.osgeo.org/gdal/ticket/1992.
                    g = capi.create_geom(OGRGeomType(wkt_m.group('type')).num)
                    capi.import_wkt(g, byref(c_char_p(wkt_m.group('wkt'))))
                else:
                    g = capi.from_wkt(byref(c_char_p(wkt_m.group('wkt'))), None, byref(c_void_p()))
            elif json_m:
    def wkt(self):
        "Returns the WKT representation of the Geometry."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
 
    @property
    def ewkt(self):
        "Returns the EWKT representation of the Geometry."

src/m/d/mdn-lib-HEAD/packages/Django/django/contrib/gis/gdal/geometries.py   mdn-lib(Download)
# Python library requisites.
import sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
 
# Getting GDAL prerequisites
from django.contrib.gis.gdal.base import GDALBase
                    # OGR_G_CreateFromWkt doesn't work with LINEARRING WKT.
                    #  See http://trac.osgeo.org/gdal/ticket/1992.
                    g = capi.create_geom(OGRGeomType(wkt_m.group('type')).num)
                    capi.import_wkt(g, byref(c_char_p(wkt_m.group('wkt'))))
                else:
                    g = capi.from_wkt(byref(c_char_p(wkt_m.group('wkt'))), None, byref(c_void_p()))
            elif json_m:
    def wkt(self):
        "Returns the WKT representation of the Geometry."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
 
    @property
    def ewkt(self):
        "Returns the EWKT representation of the Geometry."

src/b/a/badger-lib-HEAD/packages/Django/django/contrib/gis/gdal/geometries.py   badger-lib(Download)
# Python library requisites.
import sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
 
# Getting GDAL prerequisites
from django.contrib.gis.gdal.base import GDALBase
                    # OGR_G_CreateFromWkt doesn't work with LINEARRING WKT.
                    #  See http://trac.osgeo.org/gdal/ticket/1992.
                    g = capi.create_geom(OGRGeomType(wkt_m.group('type')).num)
                    capi.import_wkt(g, byref(c_char_p(wkt_m.group('wkt'))))
                else:
                    g = capi.from_wkt(byref(c_char_p(wkt_m.group('wkt'))), None, byref(c_void_p()))
            elif json_m:
    def wkt(self):
        "Returns the WKT representation of the Geometry."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
 
    @property
    def ewkt(self):
        "Returns the EWKT representation of the Geometry."

src/s/e/secret-squirrel-lib-HEAD/packages/Django/django/contrib/gis/gdal/geometries.py   secret-squirrel-lib(Download)
# Python library requisites.
import sys
from binascii import a2b_hex
from ctypes import byref, string_at, c_char_p, c_double, c_ubyte, c_void_p
 
# Getting GDAL prerequisites
from django.contrib.gis.gdal.base import GDALBase
                    # OGR_G_CreateFromWkt doesn't work with LINEARRING WKT.
                    #  See http://trac.osgeo.org/gdal/ticket/1992.
                    g = capi.create_geom(OGRGeomType(wkt_m.group('type')).num)
                    capi.import_wkt(g, byref(c_char_p(wkt_m.group('wkt'))))
                else:
                    g = capi.from_wkt(byref(c_char_p(wkt_m.group('wkt'))), None, byref(c_void_p()))
            elif json_m:
    def wkt(self):
        "Returns the WKT representation of the Geometry."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
 
    @property
    def ewkt(self):
        "Returns the EWKT representation of the Geometry."

src/c/0/c.seungjin.net-HEAD/lib/python2.5/site-packages/django/contrib/gis/gdal/srs.py   c.seungjin.net(Download)
  NAD83 / Texas South Central
"""
import re
from ctypes import byref, c_char_p, c_int, c_void_p
 
# Getting the error checking routine and exceptions
from django.contrib.gis.gdal.base import GDALBase
        EPSG code, a PROJ.4 string, and/or a projection "well known" shorthand 
        string (one of 'WGS84', 'WGS72', 'NAD27', 'NAD83').
        """
        buf = c_char_p('')
        srs_type = 'user'
 
        if isinstance(srs_input, basestring):
    def linear_name(self):
        "Returns the name of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def linear_units(self):
        "Returns the value of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
    def angular_name(self):
        "Returns the name of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def angular_units(self):
        "Returns the value of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        or angular units.
        """
        if self.projected or self.local:
            return capi.linear_units(self.ptr, byref(c_char_p()))
        elif self.geographic:
            return capi.angular_units(self.ptr, byref(c_char_p()))
        else:
    def import_wkt(self, wkt):
        "Imports the Spatial Reference from OGC WKT (string)"
        capi.from_wkt(self.ptr, byref(c_char_p(wkt)))
 
    def import_xml(self, xml):
        "Imports the Spatial Reference from an XML string."
        capi.from_xml(self.ptr, xml)
 
    #### Export Properties ####
    @property
    def wkt(self):
        "Returns the WKT representation of this Spatial Reference."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
    def pretty_wkt(self, simplify=0):
        "Returns the 'pretty' representation of the WKT."
        return capi.to_pretty_wkt(self.ptr, byref(c_char_p()), simplify)
 
    @property
    def proj(self):
        "Returns the PROJ.4 representation for this Spatial Reference."
        return capi.to_proj(self.ptr, byref(c_char_p()))
    def xml(self, dialect=''):
        "Returns the XML representation of this Spatial Reference."
        return capi.to_xml(self.ptr, byref(c_char_p()), dialect)
 
class CoordTransform(GDALBase):
    "The coordinate system transformation object."
 

src/r/e/reporter-lib-HEAD/packages/Django/django/contrib/gis/gdal/srs.py   reporter-lib(Download)
  NAD83 / Texas South Central
"""
import re
from ctypes import byref, c_char_p, c_int, c_void_p
 
# Getting the error checking routine and exceptions
from django.contrib.gis.gdal.base import GDALBase
        EPSG code, a PROJ.4 string, and/or a projection "well known" shorthand 
        string (one of 'WGS84', 'WGS72', 'NAD27', 'NAD83').
        """
        buf = c_char_p('')
        srs_type = 'user'
 
        if isinstance(srs_input, basestring):
    def linear_name(self):
        "Returns the name of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def linear_units(self):
        "Returns the value of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
    def angular_name(self):
        "Returns the name of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def angular_units(self):
        "Returns the value of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        or angular units.
        """
        if self.projected or self.local:
            return capi.linear_units(self.ptr, byref(c_char_p()))
        elif self.geographic:
            return capi.angular_units(self.ptr, byref(c_char_p()))
        else:
    def import_wkt(self, wkt):
        "Imports the Spatial Reference from OGC WKT (string)"
        capi.from_wkt(self.ptr, byref(c_char_p(wkt)))
 
    def import_xml(self, xml):
        "Imports the Spatial Reference from an XML string."
        capi.from_xml(self.ptr, xml)
 
    #### Export Properties ####
    @property
    def wkt(self):
        "Returns the WKT representation of this Spatial Reference."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
    def pretty_wkt(self, simplify=0):
        "Returns the 'pretty' representation of the WKT."
        return capi.to_pretty_wkt(self.ptr, byref(c_char_p()), simplify)
 
    @property
    def proj(self):
        "Returns the PROJ.4 representation for this Spatial Reference."
        return capi.to_proj(self.ptr, byref(c_char_p()))
    def xml(self, dialect=''):
        "Returns the XML representation of this Spatial Reference."
        return capi.to_xml(self.ptr, byref(c_char_p()), dialect)
 
class CoordTransform(GDALBase):
    "The coordinate system transformation object."
 

src/m/d/mdn-lib-HEAD/packages/Django/django/contrib/gis/gdal/srs.py   mdn-lib(Download)
  NAD83 / Texas South Central
"""
import re
from ctypes import byref, c_char_p, c_int, c_void_p
 
# Getting the error checking routine and exceptions
from django.contrib.gis.gdal.base import GDALBase
        EPSG code, a PROJ.4 string, and/or a projection "well known" shorthand 
        string (one of 'WGS84', 'WGS72', 'NAD27', 'NAD83').
        """
        buf = c_char_p('')
        srs_type = 'user'
 
        if isinstance(srs_input, basestring):
    def linear_name(self):
        "Returns the name of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def linear_units(self):
        "Returns the value of the linear units."
        units, name = capi.linear_units(self.ptr, byref(c_char_p()))
    def angular_name(self):
        "Returns the name of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        return name
 
    @property
    def angular_units(self):
        "Returns the value of the angular units."
        units, name = capi.angular_units(self.ptr, byref(c_char_p()))
        or angular units.
        """
        if self.projected or self.local:
            return capi.linear_units(self.ptr, byref(c_char_p()))
        elif self.geographic:
            return capi.angular_units(self.ptr, byref(c_char_p()))
        else:
    def import_wkt(self, wkt):
        "Imports the Spatial Reference from OGC WKT (string)"
        capi.from_wkt(self.ptr, byref(c_char_p(wkt)))
 
    def import_xml(self, xml):
        "Imports the Spatial Reference from an XML string."
        capi.from_xml(self.ptr, xml)
 
    #### Export Properties ####
    @property
    def wkt(self):
        "Returns the WKT representation of this Spatial Reference."
        return capi.to_wkt(self.ptr, byref(c_char_p()))
    def pretty_wkt(self, simplify=0):
        "Returns the 'pretty' representation of the WKT."
        return capi.to_pretty_wkt(self.ptr, byref(c_char_p()), simplify)
 
    @property
    def proj(self):
        "Returns the PROJ.4 representation for this Spatial Reference."
        return capi.to_proj(self.ptr, byref(c_char_p()))
    def xml(self, dialect=''):
        "Returns the XML representation of this Spatial Reference."
        return capi.to_xml(self.ptr, byref(c_char_p()), dialect)
 
class CoordTransform(GDALBase):
    "The coordinate system transformation object."
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next