code
stringlengths
1
1.72M
language
stringclasses
1 value
""" parser.http.searchCompanyParser module (imdb package). This module provides the HTMLSearchCompanyParser class (and the search_company_parser instance), used to parse the results of a search for a given company. E.g., when searching for the name "Columbia Pictures", the parsed page would be: http://akas.imdb.co...
Python
""" parser.http.searchPersonParser module (imdb package). This module provides the HTMLSearchPersonParser class (and the search_person_parser instance), used to parse the results of a search for a given person. E.g., when searching for the name "Mel Gibson", the parsed page would be: http://akas.imdb.com/find?q=Me...
Python
""" parser.http.utils module (imdb package). This module provides miscellaneous utilities used by the imdb.parser.http classes. Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> 2008 H. Turgut Uyar <uyar@tekir.org> This program is free software; you can redistribute it and/or modify it under the...
Python
""" imdb.parser.http._bsoup module (imdb.parser.http package). This is the BeautifulSoup.py module, not modified; it's included here so that it's not an external dependency. Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly in...
Python
""" parser.http.bsouplxml.etree module (imdb.parser.http package). This module adapts the beautifulsoup interface to lxml.etree module. Copyright 2008 H. Turgut Uyar <uyar@tekir.org> 2008 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the t...
Python
""" parser.http.bsoupxpath module (imdb.parser.http package). This module provides XPath support for BeautifulSoup. Copyright 2008 H. Turgut Uyar <uyar@tekir.org> 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 Softwar...
Python
""" parser.http.bsouplxml.html module (imdb.parser.http package). This module adapts the beautifulsoup interface to lxml.html module. Copyright 2008 H. Turgut Uyar <uyar@tekir.org> 2008 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the ter...
Python
""" parser.http package (imdb package). This package provides the IMDbHTTPAccessSystem class used to access IMDb's data through the web interface. the imdb.IMDb function will return an instance of this class when called with the 'accessSystem' argument set to "http" or "web" or "html" (this is the default). Copyright...
Python
""" parser.http.companyParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a company. E.g., for "Columbia Pictures [us]" the referred page would be: main details: http://akas.imdb.com/company/co0071509/ Copyright 2008...
Python
""" parser.http.characterParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a character. E.g., for "Jesse James" the referred pages would be: main details: http://www.imdb.com/character/ch0000001/ biography: ...
Python
""" parser.http.searchCharacterParser module (imdb package). This module provides the HTMLSearchCharacterParser class (and the search_character_parser instance), used to parse the results of a search for a given character. E.g., when searching for the name "Jesse James", the parsed page would be: http://akas.imdb....
Python
""" parser.mobile package (imdb package). This package provides the IMDbMobileAccessSystem class used to access IMDb's data for mobile systems. the imdb.IMDb function will return an instance of this class when called with the 'accessSystem' argument set to "mobile". Copyright 2005-2010 Davide Alberani <da@erlug.linux...
Python
""" parser package (imdb package). This package provides various parsers to access IMDb data (e.g.: a parser for the web/http interface, a parser for the SQL database interface, etc.). So far, the http/httpThin, mobile and sql parsers are implemented. Copyright 2004-2009 Davide Alberani <da@erlug.linux.it> This prog...
Python
""" _logging module (imdb package). This module provides the logging facilities used by the imdb package. Copyright 2009-2010 Davide Alberani <da@erlug.linux.it> 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...
Python
""" _exceptions module (imdb package). This module provides the exception hierarchy used by the imdb package. Copyright 2004-2009 Davide Alberani <da@erlug.linux.it> 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 Soft...
Python
""" utils module (imdb package). This module provides basic utilities for the imdb package. Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> 2009 H. Turgut Uyar <uyar@tekir.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
Python
""" articles module (imdb package). This module provides functions and data to handle in a smart way articles (in various languages) at the beginning of movie titles. Copyright 2009 Davide Alberani <da@erlug.linux.it> 2009 H. Turgut Uyar <uyar@tekir.org> This program is free software; you can redistribute...
Python
""" helpers module (imdb package). This module provides functions not used directly by the imdb package, but useful for IMDbPY-based programs. Copyright 2006-2010 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
Python
""" _compat module (imdb package). This module provides compatibility functions used by the imdb package to deal with unusual environments. Copyright 2008-2010 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License...
Python
""" imdb package. This package can be used to retrieve information about a movie or a person from the IMDb database. It can fetch data through different media (e.g.: the IMDb web pages, a SQL database, etc.) Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute i...
Python
""" company module (imdb package). This module provides the company class, used to store information about a given company. Copyright 2008-2009 Davide Alberani <da@erlug.linux.it> 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...
Python
#!/usr/bin/env python import os import sys import ez_setup ez_setup.use_setuptools() import setuptools # version of the software; in the code repository this represents # the _next_ release. setuptools will automatically add 'dev-rREVISION'. version = '4.7' home_page = 'http://imdbpy.sf.net/' long_desc = """IMDbP...
Python
#!/usr/bin/env python import os import sys import ez_setup ez_setup.use_setuptools() import setuptools # version of the software; in the code repository this represents # the _next_ release. setuptools will automatically add 'dev-rREVISION'. version = '4.7' home_page = 'http://imdbpy.sf.net/' long_desc = """IMDbP...
Python
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
Python
""" searchPerson.py Usage: search_person "person name" Search for the given name and print the results. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: print 'You need to install the IMDbPY package!' sys.exit(1) name = "arnold" i = imdb.IMDb() i...
Python
""" searchMovie.py Usage: search_movie "movie title" Search for the given title and print the results. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: print 'You need to install the IMDbPY package!' sys.exit(1) title = "The Matrix" i = imdb.IMDb(...
Python
""" topMovies.py Prints top 10 movies, by ratings. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: print 'You need to install the IMDbPY package!' sys.exit(1) def unic(string): try: print string except UnicodeEncodeError: print ...
Python
""" getLinkToMovie.py Usage: search_movie "movie title" Search for the given title and print the results. """ import sys # Import the IMDbPY package. try: import imdb except ImportError: print 'You need to install the IMDbPY package!' sys.exit(1) title = "The Terminator" i = imd...
Python
''' Created on 21/04/2011 @author: Eran_Z '''
Python
''' Created on 29/03/2011 @author: Eran_Z Scoring ''' from search_m import searchSingle, searchTogether from util_m import sum, BadMovie #Helper functions: def __normalizedSigmaMutualWeightHelper(w, ci, wi): ss = searchSingle(w) st = searchTogether(w, ci) #return 0 if ss < st else st*wi...
Python
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('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 custo...
Python
from django.db import models class Movie(models.Model): title = models.CharField(max_length=200, primary_key=True) year = models.PositiveSmallIntegerField() searchPair = models.ManyToManyField('self', symmetrical=False, blank=True, through='SearchResult') searchSingle = models.BigIntegerField() ...
Python
""" Test Movies module """ from django.test import TestCase from RSM.my_friends.models import RSMUser, User from RSM.my_friends.views import getUserNames from RSM.my_movies.views import __updateUserMoviesList from RSM.util import getRSMUser from RSM.algorithm.search.makeCache import makeTestCache getUserNam...
Python
''' Created on Apr 29, 2011 @author: shurok ''' from django.conf.urls.defaults import patterns urlpatterns = patterns('my_movies.views', (r'^viewMovieTypes/viewMovies/$','viewMovies'), (r'^viewMovieTypes/$','viewMovieTypes'), )
Python
''' Created on 21/04/2011 @author: Eran_Z ''' from django.contrib import admin from models import Movie, SearchResult admin.site.register(Movie) admin.site.register(SearchResult)
Python
from django.template import RequestContext from django.shortcuts import render_to_response from models import Movie from RSM.util import getRSMUser, verifySessionValidity, printDebug, getTitle def viewMovieTypes(request): nonValidSessionFlag = verifySessionValidity(request) if nonValidSessionFlag: ...
Python
#from django.db import models #from RSM.my_movies.models import * #from RSM.my_friends.models import *
Python
""" Test recommendations module """ from django.test import TestCase from RSM.my_friends.models import RSMUser, User from RSM.my_friends.views import getUserNames from RSM.my_movies.views import __updateUserMoviesList from RSM.util import getRSMUser from RSM.algorithm.search.makeCache import makeTestCache g...
Python
''' Created on 21/04/2011 @author: Eran_Z ''' from django.conf.urls.defaults import patterns urlpatterns = patterns('recommendation.views', (r'^$', 'chooseFriends'), (r'^recommend/$', 'recommend'), )
Python
from django.template import RequestContext from django.shortcuts import render_to_response from RSM.algorithm.feasibility import COR_algorithm from RSM.my_movies.models import Movie from RSM.util import verifySessionValidity, getRSMUser, getRSMGroup, getTitle recommendationLimit = 5 def recommend(request): ...
Python
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('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 custo...
Python
from django.conf.urls.defaults import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^recomm...
Python
# Django settings for RSM project. import os DEBUG = True TEMPLATE_DEBUG = DEBUG DEBUG_PRINTS = DEBUG SITE_ROOT = os.path.dirname(os.path.realpath(__file__)).replace('\\','/') ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGI...
Python
from django.shortcuts import redirect, get_object_or_404 from my_friends.models import RSMUser from my_groups.models import RSMGroup import string from django.conf import settings def getRSMUser(username): return get_object_or_404(RSMUser, user__username=username) def getRSMGroup(username, groupname):...
Python
from django.contrib import auth from django.contrib.auth.models import User from django.template import RequestContext from django.db import IntegrityError from django.shortcuts import render_to_response, get_object_or_404, redirect from RSM.my_friends.models import RSMUser from RSM.util import printDebug, getExt...
Python
from django.db import models from django.contrib.auth.models import User class RSMUser(models.Model): user = models.OneToOneField(User) friends = models.ManyToManyField('self', symmetrical=False, blank=True) seen = models.ManyToManyField('my_movies.Movie', related_name='viewers', blank=True) lik...
Python
""" Test Friends module """ from django.test import TestCase from models import RSMUser, User #from django.template import RequestContext from RSM.my_friends.views import getUserNames getUserNames = getUserNames class FriendsTest(TestCase): added = False testCount = 1 def setUp(self)...
Python
from django.conf.urls.defaults import patterns urlpatterns = patterns('my_friends.views', (r'^add/$','addFriend'), (r'^all/$','viewAllFriends'), (r'^remove/$','removeFriend'), (r'^activeAdd/$','actualAdd'), )
Python
''' Created on 21/04/2011 @author: Eran_Z ''' from django.contrib import admin from models import RSMUser admin.site.register(RSMUser)
Python
from django.template import RequestContext from django.shortcuts import render_to_response from models import RSMUser from RSM.util import verifySessionValidity, getUserNames, getRSMUser def addFriend(request): nonValidSessionFlag = verifySessionValidity(request) if nonValidSessionFlag: ret...
Python
from django.db import models class RSMGroup(models.Model): owner = models.CharField(max_length=200) groupName = models.CharField(max_length=200) members = models.ManyToManyField('my_friends.RSMUser') class Meta: unique_together = ("owner", "groupName") def __unicode_...
Python
""" Test Groups module """ from django.test import TestCase from RSM.my_friends.models import RSMUser, User #from django.template import RequestContext from RSM.my_friends.views import getUserNames from RSM.util import getRSMGroup getRSMGroup = getRSMGroup getUserNames = getUserNames class GroupsTest(T...
Python
''' Created on May 26, 2011 @author: dima ''' from django.conf.urls.defaults import patterns urlpatterns = patterns('my_groups.views', (r'^allGroups/$','allGroups'), (r'^create/$','createGroup'), (r'^remove/$','removeGroup'), (r'^activeAdd/$','actualAdd'), (r'^manage/$','editGroup'), ...
Python
from django.template import RequestContext from django.db import IntegrityError from django.shortcuts import render_to_response, redirect from models import RSMGroup from RSM.util import verifySessionValidity, getRSMGroup, getUserNames, getRSMUser, isSafeName, getExtend import hashlib def allGroups(request): ...
Python
#!/usr/bin/env pypy import os, sys, logging, re import argparse import fnmatch configurations = {'lite', 'pro'} package_dirs = { 'lite': ('src/cx/hell/android/pdfview',), 'pro': ('src/cx/hell/android/pdfviewpro',) } file_replaces = { 'lite': ( 'cx.hell.android.pdfview.', '"cx.hell.an...
Python
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
Python
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
Python
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
Python
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
Python
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import ConfigParser from ConfigParser import NoOptionError import config import getopt import os import sys import utils import time def usage(): message = """ Welcome to johannes, the ugliest downloading/unpacking/confi...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. ################################################################### # the following programmes should either be on your path, or you # should specify the full paths here. # Microsoft utility to rebase files. REBASE = "rebase...
Python
# python script for bootstrapping the johannes DeVIDE build system # PYVER_STR = '2.7.2' PYVER_STR2 = '2.7' import config import getopt import os import shutil import stat import sys import utils import glob nt_python = """ @echo off @rem script to run locally installed johannes python @rem should ...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. # for binaries NOT on your PATH, you should specify the complete path here, # e.g. SVN = '/usr/bin/svn'. For binaries ON your path, only the binary name # e.g. SVN = 'svn' SVN = 'svn' HG = 'hg' CVS = 'cvs -z3' GIT = 'git' ...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import utils import os import shutil import types class InstallPackage: """All libraries that should be installed by johannes have to have InstallPackage abstractions. This class defines which actions need to b...
Python
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import config import glob import os import re import sys, urllib import shutil import tarfile import zipfile import subprocess def cmake_command(build_dir, source_dir, cmake_params): """Invoke correct cmake commands to c...
Python
#!/usr/bin/env python # # $Id: setup.py,v 1.11 2005/02/15 16:32:22 warnes Exp $ CVS=0 from distutils.core import setup, Command, Extension from SOAPpy.version import __version__ url="http://pywebsvcs.sf.net/" long_description="SOAPpy provides tools for building SOAP clients and servers. For more information see " ...
Python
#!/usr/bin/env python # This server validates as of 4/23/01 when run with UserLand's SOAP validator # (http://validator.soapware.org/). import getopt import sys sys.path.insert (1, '..') from SOAPpy import SOAP ident = '$Id: soapware.py,v 1.2 2003/03/08 05:10:01 warnes Exp $' def whichToolkit (): return SOAP....
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. # This is a server for the XMethods matrix # (http://jake.soapware.org/currentXmethodsResults). import getopt import sys sys.path.insert (1, '..') from SOAPpy import SOAP if SOAP.Config.SSLserver: from M2Crypto import SSL ident = '...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. # This set of clients validates when run against the servers in # silab.servers. import copy import fileinput import getopt import re import string import sys import time import traceback sys.path.insert (1, '..') from SOAPpy import SOAP...
Python
#!/usr/bin/env python # Copyright (c) 2001, actzero, inc. import sys sys.path.insert(1,"..") from SOAPpy import SOAP #SOAP.Config.debug = 1 serverstring = "SOAP.py (actzero.com) running "+sys.platform NUMBUYS = 0 NUMSIMPLEBUYS = 0 NUMREQUESTS = 0 NUMPINGS = 0 def SimpleBuy(Address, ProductName, Quantity): # curren...
Python
#!/usr/bin/env python import getopt import sys import string import re import time sys.path.insert(1,"..") from SOAPpy import SOAP import traceback DEFAULT_SERVERS_FILE = './inventory.servers' DEFAULT_METHODS = ('SimpleBuy', 'RequestForQuote','Buy','Ping') def usage (error = None): sys.stdout = sys.std...
Python
from SOAPpy import SOAP import sys import getopt def usage(): print """usage: %s [options] -m, --method=METHOD#[,METHOD#...] specify METHOD# of ? for the list -p, --port=PORT# allows to specify PORT# of server """ sys.exit(1) def methodUsage(): print "The available methods are:" print "1...
Python
#!/usr/bin/env python ident = '$Id: whoisTest.py,v 1.4 2003/05/21 14:52:37 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = re.search('http://([^:]+):([0-9]+)', ...
Python
#!/usr/bin/env python ident = '$Id: BabelfishWSDLTest.py,v 1.1 2003/07/18 15:58:28 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import WSDL # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = re.search('http://([^:]+):([0-9]+)...
Python
import sys sys.path.insert(1, "..") import SOAPpy import time dep = SOAPpy.dateTimeType((2004, 3, 24, 12, 30, 59, 4, 86, 0)) ret = SOAPpy.dateTimeType((2004, 3, 26, 12, 30, 59, 4, 86, 0)) in0 = SOAPpy.structType() in0._addItem('outwardDate', dep) in0._addItem('returnDate', ret) in0._addItem('originAirport', 'den') i...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. ident = '$Id: xmethods.py,v 1.4 2003/12/18 06:31:50 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] ...
Python
#!/usr/bin/env python ident = '$Id: newsTest.py,v 1.4 2003/05/21 14:52:37 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = re.search('http://([^:]+):([0-9]+)', p...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. ident = '$Id: translateTest.py,v 1.5 2003/05/21 14:52:37 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_pro...
Python
import sys sys.path.insert(1, "..") from SOAPpy import * one = typedArrayType(data=[1],typed=type(1)) tmp = typedArrayType(data=[], typed=type(1)) print buildSOAP( one ) print buildSOAP( tmp )
Python
#!/usr/bin/python2 #standard imports import syslog, sys #domain specific imports sys.path.insert (1, '..') import SOAPpy SOAPpy.Config.simplify_objects=1 ## def test_integer(self,pass_integer): ## def test_string(self,pass_string): ## def test_float(self,pass_float): ## def test_tuple(self,pass_tup...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. import string import sys sys.path.insert (1, '..') from SOAPpy import * ident = '$Id: cardServer.py,v 1.4 2004/02/18 21:22:13 warnes Exp $' # create the list of all cards, and keep strings for each suit __cs = "Clubs" __ds = "Diamonds" ...
Python
import sys sys.path.insert(1, "..") import SOAPpy url = 'http://www.xmethods.org/sd/2001/TemperatureService.wsdl' zip = '06340' proxy = SOAPpy.WSDL.Proxy(url) temp = proxy.getTemp(zip) print 'Temperature at', zip, 'is', temp
Python
""" Check handing of unicode. """ import sys sys.path.insert(1, "..") from SOAPpy import * # Uncomment to see outgoing HTTP headers and SOAP and incoming #Config.debug = 1 #Config.dumpHeadersIn = 1 #Config.dumpSOAPIn = 1 #Config.dumpSOAPOut = 1 # ask for returned SOAP responses to be converted to basic python types...
Python
from SOAPpy import WSDL server = WSDL.Proxy('/home/warneg/src/google/googleapi/GoogleSearch.wsdl') key = "6k0oDPZQFHL0zpjy6ZO6ufUVFKBgvqTo" results = server.doGoogleSearch(key, 'warnes', 0, 10, False, "", False, "", "utf-8", "utf-8") for i in range(len(results.resultElements)): re...
Python
#!/usr/bin/env python import unittest import os, re import sys sys.path.insert (1, '..') import SOAPpy ident = '$Id: testWSDL.py,v 1.2 2003/05/09 12:46:11 warnes Exp $' # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = re.search('http://([^:]+):([0-9]+)', ...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. import sys sys.path.insert(1, "..") from SOAPpy import * # Uncomment to see outgoing HTTP headers and SOAP and incoming #Config.debug = 1 #Config.dumpHeadersIn = 1 #Config.dumpSOAPIn = 1 #Config.dumpSOAPOut = 1 # ask for returned SOAP r...
Python
#!/usr/bin/env python ident = '$Id: speedTest.py,v 1.4 2003/05/21 14:52:37 warnes Exp $' import time import sys sys.path.insert(1, "..") x='''<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3....
Python
#!/usr/bin/python import sys sys.path.insert(1, "..") import SOAPpy import time import gc import types gc.set_debug(gc.DEBUG_SAVEALL) for i in range(400): try: t = SOAPpy.SOAP.parseSOAPRPC('bad soap payload') except: pass gc.collect() if len(gc.garbage): print 'still leaking' else: prin...
Python
#!/usr/bin/python2 #standard imports import syslog, sys #domain specific imports sys.path.insert (1, '..') import SOAPpy class test_service: run = 1 def test_integer(self,pass_integer): print type(pass_integer) return pass_integer def test_string(self,pass_string): print ty...
Python
import gc import socket import threading import time import unittest import sys sys.path.insert(1, "..") import SOAPpy #SOAPpy.Config.debug=1 # global to shut down server quit = 0 def echoDateTime(dt): return dt def echo(s): """repeats a string twice""" return s + s def kill(): """tell the server ...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. import sys sys.path.insert (1, '..') from SOAPpy import * ident = '$Id: cardClient.py,v 1.4 2004/02/18 21:22:13 warnes Exp $' endpoint = "http://localhost:12027/xmethodsInterop" sa = "urn:soapinterop" ns = "http://soapinterop.org/" ser...
Python
#!/usr/bin/env python import sys, unittest sys.path.insert(1, "..") from SOAPpy import * Config.debug=1 class ClientTestCase(unittest.TestCase): def testParseRules(self): x = """<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xml...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. ident = '$Id: quoteTest.py,v 1.5 2003/12/18 06:31:50 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy']...
Python
import sys sys.path.insert(1, "..") from SOAPpy import * detailed_fault = \ """ <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://...
Python
#!/usr/bin/env python ident = '$Id: weatherTest.py,v 1.4 2003/05/21 14:52:37 warnes Exp $' import os, re import sys sys.path.insert(1, "..") from SOAPpy import SOAPProxy # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = re.search('http://([^:]+):([0-9]+)'...
Python
#!/usr/bin/env python ident = '$Id: storageTest.py,v 1.6 2005/02/16 04:24:54 warnes Exp $' import sys, os, time, signal, re sys.path.insert(1, "..") from SOAPpy import SOAPProxy, SOAPConfig, SOAPUserAgent # Check for a web proxy definition in environment try: proxy_url=os.environ['http_proxy'] phost, pport = r...
Python
""" Check handing of unicode. """ import sys sys.path.insert(1, "..") from SOAPpy import * # Uncomment to see outgoing HTTP headers and SOAP and incoming #Config.debug = 1 #Config.dumpHeadersIn = 1 #Config.dumpSOAPIn = 1 #Config.dumpSOAPOut = 1 # ask for returned SOAP responses to be converted to basic python types...
Python
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. ident = '$Id: alanbushTest.py,v 1.5 2003/05/21 14:52:37 warnes Exp $' import os, re,sys # add local SOAPpy code to search path sys.path.insert(1, "..") from SOAPpy import * Config.debug=0 # Check for a web proxy definition in environmen...
Python
#!/usr/bin/env python import sys sys.path.insert(1, "..") from SOAPpy import * server = SOAPProxy("http://206.135.217.234:8000/") server.COM_SetProperty("Visible", 1) server.Workbooks.Open("c:\\test.xls") server.COM_NestedCall('ActiveSheet.Range("A2").EntireRow.Delete()') server.quit()
Python