2 from optparse
import OptionParser
7 parser
= OptionParser(usage
="usage: %prog [options] interface")
8 parser
.add_option("-V", "--version", help="display version information", action
='store_true')
10 (options
, args
) = parser
.parse_args()
13 print "0publish (zero-install) " + version
14 print "Copyright (C) 2005 Thomas Leonard"
15 print "This program comes with ABSOLUTELY NO WARRANTY,"
16 print "to the extent permitted by law."
17 print "You may redistribute copies of this program"
18 print "under the terms of the GNU General Public License."
19 print "For more information about these matters, see the file named COPYING."
29 ans
= raw_input(q
+ " [Y/N] ").lower()
30 if ans
in ('y', 'yes'): return True
31 if ans
in ('n', 'no'): return False
33 if os
.path
.exists(interface
):
34 from update
import update
37 if confirm("Interface file '%s' does not exist. Create it?" % interface
):
38 from create
import create