code
stringlengths
1
1.72M
language
stringclasses
1 value
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF Remoting support. A Remoting request from the client consists of a short preamble, headers, and bodies. The preamble contains basic information about the nature of the request. Headers can be used to request debugging information, send authenti...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Gateway for Google App Engine. This gateway allows you to expose functions in Google App Engine web applications to AMF clients and servers. @see: U{Google App Engine homepage <http://code.google.com/appengine/docs/python/overview.html>} @sinc...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Gateway for the Django framework. This gateway allows you to expose functions in Django to AMF clients and servers. @see: U{Django homepage<http://djangoproject.com>} @since: 0.1.0 """ django = __import__('django.http') http = django.http conf = ...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Twisted server implementation. This gateway allows you to expose functions in Twisted to AMF clients and servers. @see: U{Twisted homepage<http://twistedmatrix.com>} @since: 0.1.0 """ import sys import os.path try: sys.path.remove('') except...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Remoting server implementations. @since: 0.1.0 """ import sys import types import datetime import pyamf from pyamf import remoting, util, python try: from platform import python_implementation impl = python_implementation() except Import...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ WSGI server implementation. The Python Web Server Gateway Interface (WSGI) is a simple and universal interface between web servers and web applications or frameworks. The WSGI interface has two sides: the "server" or "gateway" side, and the "appli...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Flex Data Management Service implementation. This module contains the message classes used with Flex Data Management Service. @since: 0.1.0 """ import pyamf from pyamf.flex.messaging import AsyncMessage, AcknowledgeMessage, ErrorMessage #: Names...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Flex Messaging implementation. This module contains the message classes used with Flex Data Services. @see: U{RemoteObject on OSFlash (external) <http://osflash.org/documentation/amf3#remoteobject>} @since: 0.1 """ import uuid import pyamf.util...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Compatibility classes/functions for Flex. @note: Not available in ActionScript 1.0 and 2.0. @see: U{Flex on Wikipedia<http://en.wikipedia.org/wiki/Adobe_Flex>} @since: 0.1 """ import pyamf __all__ = ['ArrayCollection', 'ObjectProxy'] class Arra...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Class alias base functionality. @since: 0.6 """ import inspect import pyamf from pyamf import python, util class UnknownClassAlias(Exception): """ Raised if the AMF stream specifies an Actionscript class that does not have a Python ...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF3 implementation. C{AMF3} is the default serialization for U{ActionScript<http://en.wikipedia.org/wiki/ActionScript>} 3.0 and provides various advantages over L{AMF0<pyamf.amf0>}, which is used for ActionScript 1.0 and 2.0. It adds support for s...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Python compatibility values and helpers. """ try: import __builtin__ as builtins except ImportError: import builtins import types func_types = ( types.BuiltinFunctionType, types.BuiltinMethodType, types.CodeType, types.FunctionTy...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details.
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Remoting tests. @since: 0.1.0 """
Python
from google.appengine.ext import db class PetModel(db.Model): """ """ # 'borrowed' from http://code.google.com/appengine/docs/datastore/entitiesandmodels.html name = db.StringProperty(required=True) type = db.StringProperty(required=True, choices=set(["cat", "dog", "bird"])) birthdate = db.Da...
Python
# The simplest Django settings possible DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = ':memory:' INSTALLED_APPS = ('adapters',)
Python
from django.db import models class SimplestModel(models.Model): """ The simplest Django model you can have """ class TimeClass(models.Model): """ A model with all the time based fields """ t = models.TimeField() d = models.DateField() dt = models.DateTimeField() class ParentRe...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ File included to make the directory a Python package. The test_*.py files are special in this directory in that they refer to the top level module names of the adapter to test. An attempt will be made to import that module but ignored if it fails (...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Test utilities. @since: 0.1.0 """ import unittest import copy import pyamf from pyamf import python class ClassicSpam: def __readamf__(self, input): pass def __writeamf__(self, output): pass class Spam(object): ""...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Unit tests. @since: 0.1.0 """ import os.path try: import unittest2 as unittest import sys sys.modules['unittest'] = unittest except ImportError: import unittest if not hasattr(unittest.TestCase, 'assertIdentical'): def asse...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Unit tests for Remoting gateways. @since: 0.1.0 """
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Because there is disparity between Python packaging (and it is being sorted out ...) we currently provide our own way to get the string of a version tuple. @since: 0.6 """ class Version(tuple): _version = None def __new__(cls, *args): ...
Python
""" """ from django.contrib.auth import models import pyamf.adapters models.User.__amf__ = { 'exclude': ('message_set', 'password'), 'readonly': ('username',) } # ensure that the adapter that we depend on is loaded .. pyamf.adapters.get_adapter('django.db.models.base') pyamf.register_package(models, model...
Python
# Copyright (c) The PyAMF Project. # See LICENSE for details. """ SQLAlchemy adapter module. @see: U{SQLAlchemy homepage<http://www.sqlalchemy.org>} @since: 0.4 """ from sqlalchemy.orm import collections import pyamf from pyamf.adapters import util pyamf.add_type(collections.InstrumentedList, util.to_list) pyamf...
Python
# Copyright (c) The PyAMF Project. # See LICENSE for details. """ Elixir adapter module. Elixir adds a number of properties to the mapped instances. @see: U{Elixir homepage<http://elixir.ematia.de>} @since: 0.6 """ import elixir.entity import pyamf from pyamf import adapters adapter = adapters.get_adapter('sqlalch...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Adapter module for U{google.appengine.ext.blobstore<http:// code.google.com/appengine/docs/python/blobstore/>}. @since: 0.6 """ from google.appengine.ext import blobstore import pyamf bi = blobstore.BlobInfo class BlobInfoStub(object): ""...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ U{collections<http://docs.python.org/library/collections.html>} adapter module. @since: 0.5 """ import collections import pyamf from pyamf.adapters import util if hasattr(collections, 'deque'): pyamf.add_type(collections.deque, util.to_list...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Adapter for the U{decimal<http://docs.python.org/library/decimal.html>} module. @since: 0.4 """ import decimal import pyamf def convert_Decimal(x, encoder): """ Called when an instance of U{decimal.Decimal<http:// docs.python.org/li...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ C{django.db.models} adapter module. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.4.1 """ from django.db.models.base import Model from django.db.models import fields from django.db.models.fields import related, files import date...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Google App Engine adapter module. Sets up basic type mapping and class mappings for using the Datastore API in Google App Engine. @see: U{Datastore API on Google App Engine<http:// code.google.com/appengine/docs/python/datastore>} @since: 0.3....
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Adapter for the stdlib C{sets} module. @since: 0.4 """ import sets import pyamf from pyamf.adapters import util if hasattr(sets, 'ImmutableSet'): pyamf.add_type(sets.ImmutableSet, util.to_tuple) if hasattr(sets, 'Set'): pyamf.add_type(...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Useful helpers for adapters. @since: 0.4 """ import __builtin__ if not hasattr(__builtin__, 'set'): from sets import Set as set def to_list(obj, encoder): """ Converts an arbitrary object C{obj} to a C{list}. """ return list...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ C{django.utils.translation} adapter module. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.4.2 """ from django.utils.translation import ugettext_lazy import pyamf def convert_lazy(l, encoder=None): if l.__class__._delegate_...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ U{array<http://docs.python.org/library/array.html>} adapter module. Will convert all array.array instances to a python list before encoding. All type information is lost (but degrades nicely). @since: 0.5 """ import array import pyamf from pyamf...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Django query adapter module. Sets up basic type mapping and class mappings for a Django models. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.1b """ from django.db.models import query import pyamf from pyamf.adapters import uti...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ The adapter package provides additional functionality for other Python packages. This includes registering classes, setting up type maps etc. @since: 0.1.0 """ import os.path import glob from pyamf.util import imports adapters_registered = Fals...
Python
# Copyright (c) The PyAMF Project. # See LICENSE for details. """ SQLAlchemy adapter module. @see: U{SQLAlchemy homepage<http://www.sqlalchemy.org>} @since: 0.4 """ from sqlalchemy import orm, __version__ try: from sqlalchemy.orm import class_mapper except ImportError: from sqlalchemy.orm.util import class...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ C{django.db.models.fields} adapter module. @see: U{Django Project<http://www.djangoproject.com>} @since: 0.4 """ from django.db.models import fields import pyamf def convert_NOT_PROVIDED(x, encoder): """ @rtype: L{Undefined<pyamf.Undefi...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides XML support. @since: 0.6 """ #: list of supported third party packages that support the C{etree} #: interface. At least enough for our needs anyway. ETREE_MODULES = [ 'lxml.etree', 'xml.etree.cElementTree', 'cElementTree', ...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ U{PyAMF<http://pyamf.org>} provides Action Message Format (U{AMF <http://en.wikipedia.org/wiki/Action_Message_Format>}) support for Python that is compatible with the Adobe U{Flash Player <http://en.wikipedia.org/wiki/Flash_Player>}. @since: Octobe...
Python
# -*- coding: utf-8 -*- # # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides the pure Python versions of L{BufferedByteStream}. Do not reference directly, use L{pyamf.util.BufferedByteStream} instead. @since: 0.6 """ import struct try: from cStringIO import StringIO except ImportErr...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF Utilities. @since: 0.1.0 """ import calendar import datetime import inspect import pyamf from pyamf import python try: from cpyamf.util import BufferedByteStream except ImportError: from pyamf.util.pure import BufferedByteStream #:...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Tools for doing dynamic imports. @since: 0.3 """ import sys __all__ = ['when_imported'] def when_imported(name, *hooks): """ Call C{hook(module)} when module named C{name} is first imported. C{name} must be a fully qualified (i.e. ...
Python
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Provides basic functionality for all pyamf.amf?.[De|E]ncoder classes. """ import types import datetime import pyamf from pyamf import util, python, xml __all__ = [ 'IndexedCollection', 'Context', 'Decoder', 'Encoder' ] try: u...
Python
import logging, os # Google App Engine imports. from google.appengine.ext.webapp import util # Force Django to reload its settings. from django.conf import settings settings._target = None # Must set this env var before importing any part of Django # 'project' is the name of the project created with django...
Python
# Django settings for deduit project. import os DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = '' # Or path...
Python
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^img/(?P<farm>\d+)/(?P<server>\d+)/(?P<id>\d+)/(?P<secret>\w+)/$', 'deduit.imgserve.views.main'), (r"^photos/friends/page(?P<page>\d+)/$", "deduit.main.views.friendsphotos"), (r"^photos/friends/$", "deduit.main.views.friendsph...
Python
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): ...
Python
#from google.appengine.api import users from google.appengine.api import urlfetch #from google.appengine.api import images from django.http import HttpResponse def main(request, farm, server, id, secret): imageUrl = "http://farm%s.static.flickr.com/%s/%s_%s_z.jpg" % (farm, server, id, secret) #imageUrl ...
Python
from google.appengine.ext import db from google.appengine.api import users class Visitor(db.Model): ip = db.StringProperty() added_on = db.DateTimeProperty(auto_now_add=True) class UserPrefs(db.Model): added_on = db.DateTimeProperty(auto_now_add=True) user = db.UserProperty() token = db....
Python
from google.appengine.api import urlfetch from xml.dom import minidom from datetime import datetime import hashlib import urllib from google.appengine.api import users from datetime import timedelta from models import UserPrefs def getPhotoDetails(photoid='0', node=None): #infoDoc = getInfoDoc(photoid) ...
Python
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): ...
Python
from django.http import HttpResponse import utils from django.utils import simplejson def photodetails(request, nsid='me', photoid='0'): photoDetails = utils.getPhotoDetailsJSON(photoid) result = simplejson.dumps(photoDetails) response = HttpResponse(result, mimetype="text/plain") return respon...
Python
from django.shortcuts import render_to_response from deduit.main.models import Visitor from deduit.main.models import UserPrefs from google.appengine.api import urlfetch from google.appengine.ext import db from xml.dom import minidom from datetime import datetime from urllib import quote import hashlib import...
Python
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
Python
"""Create portable serialized representations of Python objects. See module cPickle for a (much) faster implementation. See module copy_reg for a mechanism for registering custom picklers. See module pickletools source for extensive comments. Classes: Pickler Unpickler Functions: dump(object, file) ...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReader is the...
Python
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urlparse, urllib, types import handler import xmlreader try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] # See wh...
Python
"""Different kinds of SAX Exceptions""" import sys if sys.platform[:4] == "java": from java.lang import Exception del sys # ===== SAXEXCEPTION ===== class SAXException(Exception): """Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser o...
Python
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id: handler.py 35...
Python
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
Python
""" SAX driver for the pyexpat C module. This driver works with pyexpat.__version__ == '2.22'. """ version = "0.20" from xml.sax._exceptions import * from xml.sax.handler import feature_validation, feature_namespaces from xml.sax.handler import feature_namespace_prefixes from xml.sax.handler import feature_external_...
Python
"""Core XML support for Python. This package contains four sub-packages: dom -- The W3C Document Object Model. This supports DOM Level 1 + Namespaces. parsers -- Python wrappers for XML parsers (currently only supports Expat). sax -- The Simple API for XML, developed by XML-Dev, led by David Megginso...
Python
# # ElementTree # $Id: ElementInclude.py 1862 2004-06-18 07:31:02Z Fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware...
Python
# Wrapper module for _elementtree from _elementtree import *
Python
# # ElementTree # $Id: ElementPath.py 1858 2004-06-17 21:31:41Z Fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights re...
Python
# # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl TreeBuilde...
Python
# $Id: __init__.py 1821 2004-06-03 16:57:49Z fredrik $ # elementtree package # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2004 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you ...
Python
"""Interface to the Expat non-validating XML parser.""" __version__ = '$Revision: 17640 $' from pyexpat import *
Python
"""Python interfaces to XML parsers. This package contains one module: expat -- Python wrapper for James Clark's Expat parser, with namespace support. """
Python
# This is the Python mapping for interface NodeFilter from # DOM2-Traversal-Range. It contains only constants. class NodeFilter: """ This is the DOM2 NodeFilter interface. It contains only constants. """ FILTER_ACCEPT = 1 FILTER_REJECT = 2 FILTER_SKIP = 3 SHOW_ALL = 0x...
Python
"""Implementation of the DOM Level 3 'LS-Load' feature.""" import copy import xml.dom from xml.dom.NodeFilter import NodeFilter __all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"] class Options: """Features object that has variables set for each DOMBuilder feature. The DOMBuilder class uses a...
Python
import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" ...
Python
"""Registration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.""" from xml.dom.minicompat import * # isinstance, StringTypes # This is a list of well-known implementations. Well-known names # sho...
Python
"""Facility to use the Expat parser to load a minidom instance from a string or file. This avoids all the overhead of SAX and pulldom to gain performance. """ # Warning! # # This module is tightly bound to the implementation details of the # minidom DOM and can't be used with other DOM implementations. This # is due...
Python
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implementation # # EmptyNodeList -- lightest possible NodeList that is guarateed to # remain empty ...
Python
"""W3C Document Object Model implementation for Python. The Python mapping of the Document Object Model is documented in the Python Library Reference in the section on the xml.dom package. This package contains the following modules: minidom -- A simple implementation of the Level 1 DOM with namespace sup...
Python
"""\ minidom.py -- a lightweight DOM implementation. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this interface * SAX 2 namespaces """ import xml.dom...
Python
'''FlickrAPI uses its own in-memory XML representation, to be able to easily use the info returned from Flickr. There is no need to use this module directly, you'll get XMLNode instances from the FlickrAPI method calls. ''' import xml.dom.minidom __all__ = ('XMLNode', ) class XMLNode: """XMLNode -- generic cla...
Python
# -*- coding: utf-8 -*- '''Helper functions for the short http://fli.kr/p/... URL notation. Photo IDs can be converted to and from Base58 short IDs, and a short URL can be generated from a photo ID. The implementation of the encoding and decoding functions is based on the posts by stevefaeembra and Kohichi on http:/...
Python
# -*- encoding: utf-8 -*- '''Call result cache. Designed to have the same interface as the `Django low-level cache API`_. Heavily inspired (read: mostly copied-and-pasted) from the Django framework - thanks to those guys for designing a simple and effective cache! .. _`Django low-level cache API`: http://www.djangop...
Python
# -*- encoding: utf-8 -*- '''Module for encoding data as form-data/multipart''' import os import base64 class Part(object): '''A single part of the multipart data. >>> Part({'name': 'headline'}, 'Nice Photo') ... # doctest: +ELLIPSIS <flickrapi.multipart.Part object at 0x...> >>> image = op...
Python
# -*- encoding: utf-8 -*- '''HTTPHandler that supports a callback method for progress reports. ''' import urllib2 import httplib import logging __all__ = ['urlopen'] logging.basicConfig() LOG = logging.getLogger(__name__) progress_callback = None class ReportingSocket(object): '''Wrapper around a socket. Give...
Python
'''Exceptions used by the FlickrAPI module.''' class IllegalArgumentException(ValueError): '''Raised when a method is passed an illegal argument. More specific details will be included in the exception message when thrown. ''' class FlickrError(Exception): '''Raised when a Flickr method fails...
Python
# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
Python
# Copyright 2001-2009 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
Python
# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- '''A FlickrAPI interface. The main functionality can be found in the `flickrapi.FlickrAPI` class. See `the FlickrAPI homepage`_ for more info. .. _`the FlickrAPI homepage`: http://stuvel.eu/projects/flickrapi ''' __version__ = '1.4.2' __all__ = ('FlickrAPI', 'IllegalAr...
Python
'''Persistent token cache management for the Flickr API''' import os.path import logging import time from exceptions import LockingError logging.basicConfig() LOG = logging.getLogger(__name__) LOG.setLevel(logging.INFO) __all__ = ('TokenCache', 'SimpleTokenCache') class SimpleTokenCache(object): '''In-memory ...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
""" Developed by Andrea Stagi <stagi.andrea@gmail.com> Sanjeya Cooray <sanjeya.cooray@gmail.com> FlickrAvatar image feeder for emesene Copyright (C) 2010 Andrea Stagi - Sanjeya Cooray This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
Python
#!/usr/bin/python # A dumb example of an automated fuzzer. # # Copyright 2006 Will Drewry <redpig@dataspill.org> # Copyright 2007 Google Inc. # See docs/COPYING for License details (GPLv2) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # a...
Python
#!/usr/bin/python -i # # Copyright 2006 Will Drewry <redpig@dataspill.org> # Copyright 2007 Google Inc. # See docs/COPYING for License details (GPLv2) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Found...
Python
#!/usr/bin/python -i # # Copyright 2006 Will Drewry <redpig@dataspill.org> # Copyright 2007 Google Inc. # See docs/COPYING for License details (GPLv2) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Found...
Python