aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share
diff options
context:
space:
mode:
authorDr Scofield2009-01-26 10:11:20 +0000
committerDr Scofield2009-01-26 10:11:20 +0000
commit02c12de6c1077760e3cd965cb18b73ba48793bcb (patch)
treeb5b1353fdaaf5974d796eb06d3ee777b5f05eaff /share
parentmore eventqueue IM nonsense (diff)
downloadopensim-SC_OLD-02c12de6c1077760e3cd965cb18b73ba48793bcb.zip
opensim-SC_OLD-02c12de6c1077760e3cd965cb18b73ba48793bcb.tar.gz
opensim-SC_OLD-02c12de6c1077760e3cd965cb18b73ba48793bcb.tar.bz2
opensim-SC_OLD-02c12de6c1077760e3cd965cb18b73ba48793bcb.tar.xz
~ cleaning up code base: dropping share/python
Diffstat (limited to 'share')
-rwxr-xr-xshare/python/console/shutdown.py39
-rwxr-xr-xshare/python/grid_info.py12
2 files changed, 0 insertions, 51 deletions
diff --git a/share/python/console/shutdown.py b/share/python/console/shutdown.py
deleted file mode 100755
index 65f8255..0000000
--- a/share/python/console/shutdown.py
+++ /dev/null
@@ -1,39 +0,0 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3
4import ConfigParser
5import xmlrpclib
6import optparse
7import os.path
8
9if __name__ == '__main__':
10 parser = optparse.OptionParser()
11 parser.add_option('-c', '--config', dest = 'config', help = 'config file', metavar = 'CONFIG')
12 parser.add_option('-s', '--server', dest = 'server', help = 'URI for the grid server', metavar = 'SERVER')
13 parser.add_option('-p', '--password', dest = 'password', help = 'password for the grid server', metavar = 'PASSWD')
14 (options, args) = parser.parse_args()
15
16 configFile = options.config
17 if not configFile:
18 if os.path.isfile(os.path.expanduser('~/.opensim-console.rc')):
19 configFile = os.path.expanduser('~/.opensim-console.rc')
20 if not configFile:
21 parser.error('missing option config')
22 sys.exit(1)
23
24 config = ConfigParser.ConfigParser()
25 config.readfp(open(configFile))
26
27 server = config.get('opensim', 'server')
28 password = config.get('opensim', 'password')
29
30 if options.server: server = options.server
31 if options.password: password = options.password
32
33 gridServer = xmlrpclib.Server(server)
34 res = gridServer.admin_shutdown({'password': password})
35
36 if res['success'] == 'true':
37 print 'shutdown of %s initiated' % server
38 else:
39 print 'shutdown of %s failed' % server
diff --git a/share/python/grid_info.py b/share/python/grid_info.py
deleted file mode 100755
index 8a89328..0000000
--- a/share/python/grid_info.py
+++ /dev/null
@@ -1,12 +0,0 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3import xmlrpclib
4
5# XML-RPC URL (http_listener_port)
6gridServerURL = 'http://127.0.0.1:9000'
7
8# instantiate server object
9gridServer = xmlrpclib.Server(gridServerURL)
10
11# invoke admin_alert: requires password and message
12print gridServer.get_grid_info({})