* [9fans] Any examples of using the py9p client code?
@ 2015-03-25 7:55 6o205zd02
2015-03-25 8:01 ` Skip Tavakkolian
0 siblings, 1 reply; 6+ messages in thread
From: 6o205zd02 @ 2015-03-25 7:55 UTC (permalink / raw)
To: 9fans
Can anyone point me at an example of using the py9p
(http://mirtchovski.com/p9/py9p/ or
https://pypi.python.org/pypi/py9p/1.0.8) client code to talk to a
server. I've been playing around with a little bit, but haven't had any
luck.
More specifically, I would like to use it to write a client that talks
to P9P acme. Is that even possible? If not is there some other python
library that would help?
thanks,
Peter Canning
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Any examples of using the py9p client code?
2015-03-25 7:55 [9fans] Any examples of using the py9p client code? 6o205zd02
@ 2015-03-25 8:01 ` Skip Tavakkolian
2015-03-25 10:12 ` Bence Fábián
0 siblings, 1 reply; 6+ messages in thread
From: Skip Tavakkolian @ 2015-03-25 8:01 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
it is easy using Go
https://github.com/9fans/go
On Wed, Mar 25, 2015 at 12:55 AM <6o205zd02@sneakemail.com> wrote:
> Can anyone point me at an example of using the py9p
> (http://mirtchovski.com/p9/py9p/ or
> https://pypi.python.org/pypi/py9p/1.0.8) client code to talk to a
> server. I've been playing around with a little bit, but haven't had any
> luck.
>
> More specifically, I would like to use it to write a client that talks
> to P9P acme. Is that even possible? If not is there some other python
> library that would help?
>
> thanks,
> Peter Canning
>
>
>
[-- Attachment #2: Type: text/html, Size: 1091 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Any examples of using the py9p client code?
2015-03-25 8:01 ` Skip Tavakkolian
@ 2015-03-25 10:12 ` Bence Fábián
2015-03-25 16:24 ` Skip Tavakkolian
0 siblings, 1 reply; 6+ messages in thread
From: Bence Fábián @ 2015-03-25 10:12 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
that doesn't help much if you want to use python though :)
How far did you get Peter? Did you get past the auth stage?
Have you looked into examples/cl.py ?
py9p.Client class should do most of the heavylifting for you.
bence
2015-03-25 9:01 GMT+01:00 Skip Tavakkolian <skip.tavakkolian@gmail.com>:
> it is easy using Go
>
> https://github.com/9fans/go
>
>
> On Wed, Mar 25, 2015 at 12:55 AM <6o205zd02@sneakemail.com> wrote:
>
>> Can anyone point me at an example of using the py9p
>> (http://mirtchovski.com/p9/py9p/ or
>> https://pypi.python.org/pypi/py9p/1.0.8) client code to talk to a
>> server. I've been playing around with a little bit, but haven't had any
>> luck.
>>
>> More specifically, I would like to use it to write a client that talks
>> to P9P acme. Is that even possible? If not is there some other python
>> library that would help?
>>
>> thanks,
>> Peter Canning
>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 1839 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Any examples of using the py9p client code?
2015-03-25 10:12 ` Bence Fábián
@ 2015-03-25 16:24 ` Skip Tavakkolian
2015-03-26 7:28 ` 6o205zd02
0 siblings, 1 reply; 6+ messages in thread
From: Skip Tavakkolian @ 2015-03-25 16:24 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]
he asked "Is that even possible?", hence my suggestion.
On Wed, Mar 25, 2015 at 3:12 AM Bence Fábián <begnoc@gmail.com> wrote:
> that doesn't help much if you want to use python though :)
>
> How far did you get Peter? Did you get past the auth stage?
> Have you looked into examples/cl.py ?
> py9p.Client class should do most of the heavylifting for you.
>
> bence
>
> 2015-03-25 9:01 GMT+01:00 Skip Tavakkolian <skip.tavakkolian@gmail.com>:
>
>> it is easy using Go
>>
>> https://github.com/9fans/go
>>
>>
>> On Wed, Mar 25, 2015 at 12:55 AM <6o205zd02@sneakemail.com> wrote:
>>
>>> Can anyone point me at an example of using the py9p
>>> (http://mirtchovski.com/p9/py9p/ or
>>> https://pypi.python.org/pypi/py9p/1.0.8) client code to talk to a
>>> server. I've been playing around with a little bit, but haven't had any
>>> luck.
>>>
>>> More specifically, I would like to use it to write a client that talks
>>> to P9P acme. Is that even possible? If not is there some other python
>>> library that would help?
>>>
>>> thanks,
>>> Peter Canning
>>>
>>>
>>>
>
[-- Attachment #2: Type: text/html, Size: 2196 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Any examples of using the py9p client code?
2015-03-25 16:24 ` Skip Tavakkolian
@ 2015-03-26 7:28 ` 6o205zd02
2015-03-26 7:54 ` Bence Fábián
0 siblings, 1 reply; 6+ messages in thread
From: 6o205zd02 @ 2015-03-26 7:28 UTC (permalink / raw)
To: 9fans
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9fans] Any examples of using the py9p client code?
2015-03-26 7:28 ` 6o205zd02
@ 2015-03-26 7:54 ` Bence Fábián
0 siblings, 0 replies; 6+ messages in thread
From: Bence Fábián @ 2015-03-26 7:54 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-26 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 7:55 [9fans] Any examples of using the py9p client code? 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
2015-03-26 7:54 ` Bence Fábián
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).