Hi,
On question 1, I have commented on your ticket
(http://trac.gispython.org/lab/ticket/234) , but just to summarise for
the list, OWSLib uses urllib2 for url access, so you can set a proxy
handler in urllib2 before using owslib like this:
import urllib2
from owslib.wms import WebMapService
# install the required proxy handler
proxyHandler = urllib2.ProxyHandler({"http" : "http://yourproxy.com:8080"})
opener = urllib2.build_opener(proxyHandler)
urllib2.install_opener(opener)
# Now OWSLib should use the proxy.
wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi?')
print wms.contents
Does that solve your problem?
Cheers,
Dom
On 29/09/10 20:14, Alexander Bruy wrote:
Hi all,
I develop small tool for working with OGC servises (CSW and WCS) and
use OWSLib in my work.
I have some questions about usage this great library.
1. Is it possible to define a proxy server to use? In some cases
there is no environment variables or registry entries or users
need to specify another server then system-wide proxy.
2. Some servers don't have optional capabilities entries (e.g.
provider.contact.position). How I can handle this situation?
Now I create if statement for each entry:
if provider.contact is None:
pass
else:
# do something
May be there is a more correct way to do this?
Thanks
P.S.: Sorry for my English, it's not my native language
_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community