yml2c
changeset 43 fb35b9db9ca1
parent 41 98a53c3282c3
child 50 963c1b542610
--- a/yml2c	Thu Oct 27 12:51:47 2016 +0200
+++ b/yml2c	Tue Mar 17 10:26:38 2020 +0100
@@ -15,6 +15,8 @@
 from yml2 import ymlCStyle, comment, oldSyntax
 import yml2.backend as backend
 
+YML_DEFAULT_PATH = [os.path.dirname(backend.__file__)]
+
 def printInfo(option, opt_str, value, parser):
     sys.stdout.write(__doc__)
     sys.exit(0)
@@ -58,7 +60,7 @@
     if options.includePathText:
         backend.includePath = options.includePathText.split(':')
 
-    dirs = os.environ.get('YML_PATH', '.').split(':')
+    dirs = os.environ.get('YML_PATH', '.').split(':') + YML_DEFAULT_PATH
     backend.includePath.extend(dirs)
 
     files = fileinput.input(args, mode="rU", openhook=fileinput.hook_encoded(options.encoding))