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() I can allow the urllib module in /Products/GlobalScripts/__init__.py The problem is how allow the read() method from socket._fileobject class in my PythonScript??? M.b. there is another way to get the page's html-code from any server? -- Best regards, www.uralfirm.ru Dmitry Matveev mailto:matveev@uralfirm.ru
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
participants (2)
-
Dmitry Matveev -
Maik Jablonski