Changeset 3031:bbcf87fbed09 in livinglogic.python.xist for src/ll/xist/scripts/dtd2xsc.py

Show
Ignore:
Timestamp:
11/13/07 22:28:12 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add the ability to pass arguments to all main functions in the scripts.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/scripts/dtd2xsc.py

    r2990 r3031  
    160160 
    161161 
    162 def main(): 
     162def main(args=None): 
    163163    p = optparse.OptionParser(usage="usage: %prog [options] <input.dtd >output_xmlns.py") 
    164164    p.add_option("-x", "--xmlns", dest="xmlns", help="the namespace name for this module") 
     
    167167    p.add_option("-d", "--defaults", action="store_true", dest="defaults", help="Output default values for attributes") 
    168168 
    169     (options, args) = p.parse_args() 
     169    (options, args) = p.parse_args(args) 
    170170    if len(args) != 0: 
    171171        p.error("incorrect number of arguments")