From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <32495-1427354924-796552@sneakemail.com> References: <6574-1427270126-92759@sneakemail.com> <32495-1427354924-796552@sneakemail.com> Date: Thu, 26 Mar 2015 08:54:43 +0100 Message-ID: From: =?UTF-8?B?QmVuY2UgRsOhYmnDoW4=?= To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] Any examples of using the py9p client code? Topicbox-Message-UUID: 4afc7a7a-ead9-11e9-9d60-3106f5b1d025 Glad we could help :) 2015-03-26 8:28 GMT+01:00, 6o205zd02@sneakemail.com <6o205zd02@sneakemail.com>: > I hadn't gotten anywhere, as I was having trouble figuring out how to > even get started. The py9p.Client class expects an fd and credentials, > but its documentation is nonexistent, so I was a bit mystified about > what fd and credentials I was supposed to pass in. I had taken a quick > look at cl.py, and it was creating a AF_INET socket, but P9P acme > doesn't listen on an AF_INET socket. > > Based on the replies, I took a look at the go code, a closer look at > pyp9.Client and cl.py and did a little experimenting and discovered I > just needed to create an AF_UNIX socket for /tmp/ns.$USER.$DISPLAY/acme > and a 'trivial' py9p.Credentials object, and I've successfully called > Client.stat and Client.ls, so I should be able to try doing something > "real" now. > > Skip and Bence, thanks for the hints. I just needed a little nudge to > get me past my mental block. > > - Peter Canning > >