Python & SOAP

2005-12-25 Thread annaiak
I trying to run some implementation of SOAP in Python. Iam using ZSI, 
but iam little bit lost. I downloaded the official documentation, but 
iam still not able to understand relations between objects (soapwriter, 
typecode). Everything i can, is send a simple string via return value of 
server function to client request. I need more. Some examples would be 
useful for me. Searching with google had no results 
(http://www-128.ibm.com/developerworks/webservices/library/ws-pyth9/). I 
need sending data inside function body. I need send contents /etc/passwd 
or contents postrgresql table.
I'll be glad if you have some experience or at least some links.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: fetching images from web?

2005-12-28 Thread annaiak
[EMAIL PROTECTED] wrote:
> hi, i want to automate some tasks of gathering photos from web, i tried
> urllib/urllib2, both ended up without much success (saved gifs with
> only a border, nothing else)..
> 
> the code i used was:
> 
> 
data = 
urllib2.urlopen("http://aspn.activestate.com/ASPN/img/komodo_aspn_other.gif";)
  #was looking through cookbook, so i used that as a sample image
data = data.read()
file = open("f:/test.gif", "w")
file.write(data)
file.close()
> 
> 
> 
> can someone suggest a better way (or what's wrong with urllib/urllib2)?
> thanks alot!
> 
fetching images from web is my little hobby (but i dont know, if you 
want fetch this kind of images). i sending my little script.

import urllib
for i in range(25,286,1):
if i<100: n='0'+str(i)
else: n=str(i)
for j in range(16):
if j<10: o='0'+str(j)
else: o=str(j)
s='used for error detecting'

url='http://www.paradisetoons.com/ima/toon'+str(i)+'/p'+str(j)+'.jpg'
fil='e:/pics/xxz37/prtn_'+n+'_'+o+'.jpg'
try:
s=urllib.urlopen(url).readline(6)
except:
print ''
if s.lower()=='':
print 'file '+url+' does not exist'
else:   
print 'downloading file: '+url
urllib.urlretrieve(url,fil)

any sugestions for doing this better?
-- 
http://mail.python.org/mailman/listinfo/python-list