Project/Project.py

changeset 2025
8bb085c59cd2
parent 1961
2e7f691cade9
child 2031
c36c2eb62a75
diff -r 717b72b32420 -r 8bb085c59cd2 Project/Project.py
--- a/Project/Project.py	Wed Sep 05 19:19:16 2012 +0200
+++ b/Project/Project.py	Wed Sep 05 20:07:02 2012 +0200
@@ -2760,6 +2760,20 @@
         """
         return self.pfile
         
+    def getProjectName(self):
+        """
+        Public method to get the name of the project.
+        
+        The project name is determined from the name of the project file.
+        
+        @return name of the project (string)
+        """
+        if self.pfile:
+            name = os.path.splitext(self.pfile)[0]
+            return os.path.basename(name)
+        else:
+            return ""
+        
     def getProjectManagementDir(self):
         """
         Public method to get the path of the management directory.

eric ide

mercurial