[svn r40705] move greenlet support objects to the "py/green" directory.

--HG--
branch : trunk
This commit is contained in:
hpk 2007-03-18 17:28:04 +01:00
parent 5506b03f81
commit 9515dafb1c
15 changed files with 14 additions and 14 deletions

View File

@ -13,8 +13,8 @@ There are some features lacking, most notable:
"""
import sys, os, py, inspect
from py.__.net import greensock2
from py.__.net.msgstruct import message, decodemessage
from py.__.green import greensock2
from py.__.green.msgstruct import message, decodemessage
MSG_REMOTE_EXEC = 'r'
MSG_OBJECT = 'o'
@ -163,7 +163,7 @@ class PopenCmdGateway(Gateway):
action = "exec input()"
def __init__(self, cmdline):
from py.__.net.pipe.fd import FDInput, FDOutput
from py.__.green.pipe.fd import FDInput, FDOutput
child_in, child_out = os.popen2(cmdline, 't', 0)
fdin = FDInput(child_out.fileno(), child_out.close)
fdout = FDOutput(child_in.fileno(), child_in.close)
@ -173,14 +173,14 @@ class PopenCmdGateway(Gateway):
def get_bootstrap_code():
# XXX assumes that the py lib is installed on the remote side
src = []
src.append('from py.__.net import greenexecnet')
src.append('from py.__.green import greenexecnet')
src.append('greenexecnet.PopenCmdGateway.run_server()')
src.append('')
return '%r\n' % ('\n'.join(src),)
get_bootstrap_code = staticmethod(get_bootstrap_code)
def run_server():
from py.__.net.pipe.fd import FDInput, FDOutput
from py.__.green.pipe.fd import FDInput, FDOutput
gw = Gateway(input = FDInput(os.dup(0)),
output = FDOutput(os.dup(1)),
is_remote = True)

View File

@ -1,4 +1,4 @@
from py.__.net import greensock2
from py.__.green import greensock2
VERBOSE = True

View File

@ -1,5 +1,5 @@
import os
from py.__.net import greensock2
from py.__.green import greensock2
class FDInput(object):

View File

@ -1,4 +1,4 @@
from py.__.net import greensock2
from py.__.green import greensock2
import socket, errno, os
error = socket.error

View File

@ -1,4 +1,4 @@
from py.__.net.pipe.common import BufferedInput
from py.__.green.pipe.common import BufferedInput
class MeetingPointInput(BufferedInput):

View File

@ -1,6 +1,6 @@
import BaseHTTPServer
from py.__.net import greensock2
from py.__.net.pipe.gsocket import GreenSocket
from py.__.green import greensock2
from py.__.green.pipe.gsocket import GreenSocket
class GreenMixIn:

View File

@ -1,5 +1,5 @@
import py
from py.__.net.greenexecnet import *
from py.__.green.greenexecnet import *
def test_simple():
gw = PopenGateway()

View File

@ -1,6 +1,6 @@
import py
from socket import *
from py.__.net.greensock2 import *
from py.__.green.greensock2 import *
def test_meetingpoint():
giv1, acc1 = meetingpoint()

View File

@ -1,5 +1,5 @@
import os, random
from py.__.net.pipelayer import PipeLayer, pipe_over_udp, PipeOverUdp
from py.__.green.pipelayer import PipeLayer, pipe_over_udp, PipeOverUdp
def test_simple():
data1 = os.urandom(1000)