AssistantEric/APIsManager.py

changeset 127
1c7a8660933f
parent 123
a4793081090c
child 131
7d868e8e1cfb
equal deleted inserted replaced
126:43576a502337 127:1c7a8660933f
942 942
943 @keyparam normalized flag indicating a normalized filename is wanted 943 @keyparam normalized flag indicating a normalized filename is wanted
944 (boolean) 944 (boolean)
945 @return list of project form sources (list of strings) 945 @return list of project form sources (list of strings)
946 """ 946 """
947 if self.__project.pdata["PROGLANGUAGE"][0] in ["Python", "Python2", 947 if self.__project.getProjectLanguage() in ["Python", "Python2",
948 "Python3"]: 948 "Python3"]:
949 sourceExt = ".py" 949 sourceExt = ".py"
950 elif self.__project.pdata["PROGLANGUAGE"][0] == "Ruby": 950 elif self.__project.getProjectLanguage() == "Ruby":
951 sourceExt = ".rb" 951 sourceExt = ".rb"
952 else: 952 else:
953 return [] 953 return []
954 954
955 formsSources = [] 955 formsSources = []
956 for fn in self.__project.pdata["FORMS"]: 956 try:
957 forms = self.__project.getProjectFiles("FORMS")
958 except AttributeError:
959 forms = self.__project.pdata["FORMS"]
960 for fn in forms:
957 ofn = os.path.splitext(fn)[0] 961 ofn = os.path.splitext(fn)[0]
958 dirname, filename = os.path.split(ofn) 962 dirname, filename = os.path.split(ofn)
959 formSource = os.path.join(dirname, "Ui_" + filename + sourceExt) 963 formSource = os.path.join(dirname, "Ui_" + filename + sourceExt)
960 if normalized: 964 if normalized:
961 formSource = os.path.join( 965 formSource = os.path.join(

eric ide

mercurial