make py lib a self-contained directory again
- move and merge _py/ bits back to py/ - fixes all around --HG-- branch : trunk
This commit is contained in:
21
py/impl/path/gateway/channeltest2.py
Normal file
21
py/impl/path/gateway/channeltest2.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import py
|
||||
from remotepath import RemotePath
|
||||
|
||||
|
||||
SRC = open('channeltest.py', 'r').read()
|
||||
|
||||
SRC += '''
|
||||
import py
|
||||
srv = PathServer(channel.receive())
|
||||
channel.send(srv.p2c(py.path.local("/tmp")))
|
||||
'''
|
||||
|
||||
|
||||
#gw = execnet.SshGateway('codespeak.net')
|
||||
gw = execnet.PopenGateway()
|
||||
gw.remote_init_threads(5)
|
||||
c = gw.remote_exec(SRC, stdout=py.std.sys.stdout, stderr=py.std.sys.stderr)
|
||||
subchannel = gw._channelfactory.new()
|
||||
c.send(subchannel)
|
||||
|
||||
p = RemotePath(subchannel, c.receive())
|
||||
Reference in New Issue
Block a user