Mercurial > hg > carton
annotate tests/packageB/packageB.py @ 15:f05e636b7444
now you can specify the name of the env in the created script
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 08 Jul 2011 15:35:53 -0700 |
parents | 29b36a390857 |
children |
rev | line source |
---|---|
6
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 packageB |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 """ |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 import sys |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 from optparse import OptionParser |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 def main(args=sys.argv[1:]): |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 # parse command line arguments |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 usage = '%prog [options] ...' |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 parser = OptionParser(usage=usage, description=__doc__) |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 options, args = parser.parse_args(args) |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
16 |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
17 if __name__ == '__main__': |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
18 main() |
29b36a390857
add some bogus packages ill need for da test
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
19 |