Hello,
I also achieved to use python's support for domain sockets
to connect to vimb. The socket module needs to be imported
import socket

Then, a socket object needs to be created

vimbsock = socket.socket(socket.AF_UNIX,socket.SOCK_STREAM)

If the variable vs contains the path to vimb socket,

vimbsock.connect(vs)

establishes the connection to vimb.

commands can be sent to the browser via

vimbsock.send(command)

Note that teh command string needs to be terminated with a newline
in order to be effective, e.g.
vimbsock.send(":open foobar.com<CR>\n")

The output can be retrieved with vimbsock.recv , but I could not put it
to a good use, and it often freezes python indefinitely.

As the examples like formfeeding do not require parsing the socket
output, it does not yet matter: Python can be used as a scripting
language instead of bash for this kind of tasks.


greetings,
Klaus Schilling

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
vimb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vimb-users

Reply via email to