[Zope] Re: read() method
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Mon, 09 Dec 2002 14:49:01 +0100
Dmitry Matveev wrote:
> Hello!
> For my way of solution the problem, i have to use the
> same code in PythonScript, not in External Method:
>
> import urllib
> params = urllib.urlencode({’spam’ : 1, ’eggs’ : 2, ’bacon’: 0})
> f = urllib.urlopen( "http://www.musi-cal.com/")
> print f.read()
>
> The problem is how allow the read() method from socket._fileobject
> class in my PythonScript???
Can you explain why do you need the code in a PythonScript and not in an
ExternalMethod? That's why ExternalMethods are invented for. Maybe you
should write a kind of wrapper in an ExternalMethod which do you call
with some args from your PythonScripts.
-mj