aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
blob: f6c4de125edf5fd820595d36fe07092b099bb7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

import sys
import optparse
import logging
import socket

import bjsonrpc
import bjsonrpc.connection
import augeas

# =============================================================================
# Command line handling
def main():

    socket_path="/tmp/exmachina.sock"
    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    sock.connect(socket_path)

    c = bjsonrpc.connection.Connection(sock)
    print c.call.whattime()
    print c.call.listfiles()

if __name__ == '__main__':
    main()