1#!/usr/bin/env python 2 3# Copyright 2019 The Chromium Authors. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7""" 8Writes True if the argument is a directory. 9""" 10 11from __future__ import print_function 12 13import os.path 14import sys 15 16 17def main(): 18 print(is_dir(sys.argv[1]), end='') 19 return 0 20 21 22def is_dir(dir_name): 23 return str(os.path.isdir(dir_name)) 24 25 26def DoMain(args): 27 """Hook to be called from gyp without starting a separate python 28 interpreter.""" 29 return is_dir(args[0]) 30 31 32if __name__ == '__main__': 33 sys.exit(main()) 34