You are not logged in.
Pages: 1
Hello (again).
I'm looking for some information regarding usage of unix domain sockets (or file sockets) via Python. I've googled for ages but I can't find any example.
Can anyone please give me a quick overview?
Thanks again.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
it isn't that hard, but the documentation on the python page is a bit wired (no explanation of returns types, etc.)
but did you have a look at this page?
Offline
I have, but it doesn't relate to file sockets. I don't quite know how am I supposed to work with those, how to create them, how to write to them or how to read from them.
Can you please explain these?
Thanks.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
do you need a file socket, or could you get by with a pipe?
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Man, I wrote this post then the network went down at work... and couldn't post it... skipping all the examples I had:
do what the article has *exactly* but change "AF_INET" to "AF_UNIX" - done...
you should really delve into BSD style sockets if you want to do unix-socket based IPC...
also, python is generally portable. Unix domain sockets are not. The article points to using TCP sockets for IPC, which is a good idea with python because *everything* supports TCP sockets
Offline
The application I'm working on is an updater for Arch, so portability is not an issue
I guess I'll use TCP sockets then after all.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
Pages: 1