Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: dart/tools/list_pkg_directories.py

Issue 11478021: Have list_pkg_directories.py print something. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/pkg/pkg.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6
7 '''Tool for listing the directories under pkg, with their lib directories. 6 '''Tool for listing the directories under pkg, with their lib directories.
8 Used in pkg.gyp. Lists all of the directories in the current directory 7 Used in pkg.gyp. Lists all of the directories in the current directory
9 which have a lib subdirectory. 8 which have a lib subdirectory.
10 9
11 Usage: 10 Usage:
12 python tools/list_pkg_directories.py 11 python tools/list_pkg_directories.py
13 ''' 12 '''
13
14 import os 14 import os
15 import sys
15 16
16 paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir('.'))) 17 def main(argv):
17 filter(lambda x: os.path.exists(x), paths) 18 paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir(argv[1])))
19 for lib in filter(lambda x: os.path.exists(x), paths):
20 print lib
21
22 if __name__ == '__main__':
23 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « dart/pkg/pkg.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698