Rev 869 | Rev 887 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 869 | Rev 885 | ||
|---|---|---|---|
| Line 320... | Line 320... | ||
| 320 | print "" |
320 | print "" |
| 321 | 321 | ||
| 322 | 322 | ||
| 323 | def main(): |
323 | def main(): |
| 324 | try: |
324 | try: |
| 325 | opts, args = getopt.getopt(sys.argv[1:], " |
325 | opts, args = getopt.getopt(sys.argv[1:], "hlrc", ["help", "list", "regenerate", "add=", "del=", "new="]) |
| 326 | except getopt.GetoptError, err: |
326 | except getopt.GetoptError, err: |
| 327 | # print help information and exit: |
327 | # print help information and exit: |
| 328 | print str(err) # will print something like "option -a not recognized" |
328 | print str(err) # will print something like "option -a not recognized" |
| 329 | usage() |
329 | usage() |
| 330 | sys.exit(2) |
330 | sys.exit(2) |
| Line 332... | Line 332... | ||
| 332 | if len(sys.argv) == 1: |
332 | if len(sys.argv) == 1: |
| 333 | usage() |
333 | usage() |
| 334 | sys.exit() |
334 | sys.exit() |
| 335 | 335 | ||
| 336 | for o, a in opts: |
336 | for o, a in opts: |
| - | 337 | if o in ("-c"): |
|
| - | 338 | modules = getModules() |
|
| - | 339 | ||
| - | 340 | for module in modules: |
|
| - | 341 | print module |
|
| - | 342 | ||
| 337 |
|
343 | elif o in ("-l", "--list"): |
| 338 | modules = getModules() |
344 | modules = getModules() |
| 339 | 345 | ||
| 340 | print "Available modules" |
346 | print "Available modules" |
| 341 | print "=================" |
347 | print "=================" |
| 342 | for module in modules: |
348 | for module in modules: |
| 343 | print module |
349 | print module |
| 344 | 350 | ||
| - | 351 | ||
| - | 352 | if os.path.exists(localmoddir): |
|
| 345 | print "" |
353 | print "" |
| 346 | 354 | ||
| 347 | modules = getLocalModules() |
355 | modules = getLocalModules() |
| 348 | 356 | ||
| 349 | print "Modules used in this application" |
357 | print "Modules used in this application" |