490 |
490 |
491 def createConfig(): |
491 def createConfig(): |
492 """ |
492 """ |
493 Create a config file with the respective config entries. |
493 Create a config file with the respective config entries. |
494 """ |
494 """ |
495 global cfg |
495 global cfg, sourceDir |
496 |
496 |
497 apis = [] |
497 apis = [] |
498 for progLanguage in progLanguages: |
498 for progLanguage in progLanguages: |
499 for apiName in glob.glob(os.path.join("eric", "APIs", progLanguage, "*.api")): |
499 for apiName in glob.glob(os.path.join(sourceDir, "APIs", progLanguage, "*.api")): |
500 apis.append(os.path.basename(apiName)) |
500 apis.append(os.path.basename(apiName)) |
501 if progLanguage == "Python": |
501 if progLanguage == "Python": |
502 # treat Python3 API files the same as Python API files |
502 # treat Python3 API files the same as Python API files |
503 for apiName in glob.glob(os.path.join("eric", "APIs", "Python3", "*.api")): |
503 for apiName in glob.glob(os.path.join(sourceDir, "APIs", "Python3", "*.api")): |
504 apis.append(os.path.basename(apiName)) |
504 apis.append(os.path.basename(apiName)) |
505 |
505 |
506 fn = 'eric5config.py' |
506 fn = 'eric5config.py' |
507 config = \ |
507 config = \ |
508 """# -*- coding: utf-8 -*- |
508 """# -*- coding: utf-8 -*- |