9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: 6o205zd02@sneakemail.com
To: 9fans@9fans.net
Subject: Re: [9fans] Any examples of using the py9p client code?
Date: Thu, 26 Mar 2015 00:28:40 -0700	[thread overview]
Message-ID: <32495-1427354924-796552@sneakemail.com> (raw)
In-Reply-To: <CAJSxfmKPyEKyk=+Cdb5Hp7vb8y09uD6JoL+c2wwgWihzpaoUpQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 1244 bytes --]

  reply	other threads:[~2015-03-26  7:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  7:55 6o205zd02
2015-03-25  8:01 ` Skip Tavakkolian
2015-03-25 10:12   ` Bence Fábián
2015-03-25 16:24     ` Skip Tavakkolian
2015-03-26  7:28       ` 6o205zd02 [this message]
2015-03-26  7:54         ` Bence Fábián

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32495-1427354924-796552@sneakemail.com \
    --to=6o205zd02@sneakemail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).