3
# Twisted, the Framework of Your Internet
4
# Copyright (C) 2001 Matthew W. Lefkowitz
6
# This library is free software; you can redistribute it and/or
7
# modify it under the terms of version 2.1 of the GNU Lesser General Public
8
# License as published by the Free Software Foundation.
10
# This library is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# Lesser General Public License for more details.
15
# You should have received a copy of the GNU Lesser General Public
16
# License along with this library; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
"""This script is a frontend to a Twisted Reality 'Pump' server;
20
it can use either the GTK or TK frontend.
23
### TwistedPython Preamble
24
# This makes sure that users don't have to set up their environment
25
# specially in order to run these programs from bin/.
28
if string.find(os.path.abspath(sys.argv[0]),'Twisted') != -1:
29
sys.path.append(os.path.dirname(
30
os.path.dirname(os.path.abspath(sys.argv[0]))))
33
from twisted.python import usage
35
class Options(usage.Options):
36
synopsis = "Usage: faucet [--toolkit tk]"
37
optStrings = [["toolkit", "t", "gtk", "One of: gtk, tk"]]
43
if config.toolkit != 'gtk':
45
from twisted.reality.ui import gtkfaucet
48
from twisted.reality.ui import tkfaucet
50
print "Neither GTK nor TK found."