equal
deleted
inserted
replaced
1 import os |
1 import os |
2 from POULibrary import POULibrary |
2 from POULibrary import POULibrary |
3 from PythonFileCTNMixin import PythonFileCTNMixin |
3 from PythonFileCTNMixin import PythonFileCTNMixin |
4 from util.misc import opjimg |
|
5 |
4 |
6 class PythonLibrary(POULibrary): |
5 class PythonLibrary(POULibrary): |
7 def GetLibraryPath(self): |
6 def GetLibraryPath(self): |
8 return os.path.join(os.path.split(__file__)[0], "pous.xml") |
7 return os.path.join(os.path.split(__file__)[0], "pous.xml") |
9 |
8 |
29 |
28 |
30 return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), "" |
29 return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), "" |
31 |
30 |
32 class PythonFile(PythonFileCTNMixin): |
31 class PythonFile(PythonFileCTNMixin): |
33 |
32 |
34 def GetIconPath(self): |
33 def GetIconName(self): |
35 return opjimg("Pyfile") |
34 return "Pyfile" |
36 |
35 |
37 def CTNGenerate_C(self, buildpath, locations): |
36 def CTNGenerate_C(self, buildpath, locations): |
38 current_location = self.GetCurrentLocation() |
37 current_location = self.GetCurrentLocation() |
39 # define a unique name for the generated C file |
38 # define a unique name for the generated C file |
40 location_str = "_".join(map(lambda x:str(x), current_location)) |
39 location_str = "_".join(map(lambda x:str(x), current_location)) |