A fork of https://github.com/Synerty/SOAPpy-py3 This is a working tree till fixes get imported upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
739 B

  1. #!/usr/bin/env python
  2. # Copyright (c) 2001 actzero, inc. All rights reserved.
  3. ident = '$Id: translateTest.py,v 1.5 2003/05/21 14:52:37 warnes Exp $'
  4. import os, re
  5. import sys
  6. sys.path.insert(1, "..")
  7. from SOAPpy import SOAPProxy
  8. # Check for a web proxy definition in environment
  9. try:
  10. proxy_url=os.environ['http_proxy']
  11. phost, pport = re.search('http://([^:]+):([0-9]+)', proxy_url).group(1,2)
  12. proxy = "%s:%s" % (phost, pport)
  13. except:
  14. proxy = None
  15. server = SOAPProxy("http://services.xmethods.com:80/perl/soaplite.cgi",
  16. http_proxy=proxy)
  17. babel = server._ns('urn:xmethodsBabelFish#BabelFish')
  18. print babel.BabelFish(translationmode = "en_fr",
  19. sourcedata = "The quick brown fox did something or other")