py_ext/py_ext.py
changeset 738 413946c04c87
parent 731 4fc681ed0c61
child 742 41a4a560406c
equal deleted inserted replaced
737:7b421e080636 738:413946c04c87
     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 import opjimg
     4 
     5 
     5 class PythonLibrary(POULibrary):
     6 class PythonLibrary(POULibrary):
     6     def GetLibraryPath(self):
     7     def GetLibraryPath(self):
     7         return os.path.join(os.path.split(__file__)[0], "pous.xml") 
     8         return os.path.join(os.path.split(__file__)[0], "pous.xml") 
     8 
     9 
    27         pythonfile.close()
    28         pythonfile.close()
    28         
    29         
    29         return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), ""
    30         return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), ""
    30 
    31 
    31 class PythonFile(PythonFileCTNMixin):
    32 class PythonFile(PythonFileCTNMixin):
       
    33     
       
    34     def GetIconPath(self):
       
    35         return opjimg("Pyfile")
       
    36     
    32     def CTNGenerate_C(self, buildpath, locations):
    37     def CTNGenerate_C(self, buildpath, locations):
    33         current_location = self.GetCurrentLocation()
    38         current_location = self.GetCurrentLocation()
    34         # define a unique name for the generated C file
    39         # define a unique name for the generated C file
    35         location_str = "_".join(map(lambda x:str(x), current_location))
    40         location_str = "_".join(map(lambda x:str(x), current_location))
    36         
    41