Index: tools/list_pkg_directories.py |
=================================================================== |
--- tools/list_pkg_directories.py (revision 0) |
+++ tools/list_pkg_directories.py (revision 0) |
@@ -0,0 +1,18 @@ |
+#!/usr/bin/env python |
ahe
2012/12/06 13:44:39
The style guide we use for Python is http://www.ch
Alan Knight
2012/12/06 22:09:23
OK. I don't really know Python, so I don't even kn
ahe
2012/12/06 23:02:28
See: http://google-styleguide.googlecode.com/svn/t
|
+# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+# for details. All rights reserved. Use of this source code is governed by a |
+# BSD-style license that can be found in the LICENSE file. |
+ |
+ |
+'''Tool for listing the directories under pkg, with their lib directories. |
+Used in pkg.gyp. Lists all of the directories in the current directory |
+which have a lib subdirectory. |
+ |
+Usage: |
+ python tools/make_links.py TARGET SOURCES... |
ahe
2012/12/06 13:44:39
The comment is out of date.
Alan Knight
2012/12/06 22:09:23
Done.
|
+''' |
+import os |
+ |
+paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir('.'))) |
+filter(lambda x: os.path.exists(x), paths) |
+ |
ahe
2012/12/06 13:44:39
Extra line.
Alan Knight
2012/12/06 22:09:23
Done.
|