[gnome-builder] snippets/python: add some basic templates
- From: Igor Gnatenko <ignatenko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] snippets/python: add some basic templates
- Date: Fri, 9 Jan 2015 06:30:38 +0000 (UTC)
commit 367b6f4bfa7bfa2307c0215981752dda10cbc788
Author: Igor Gnatenko <ignatenko src gnome org>
Date: Thu Jan 8 17:50:25 2015 +0300
snippets/python: add some basic templates
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=742592
Signed-off-by: Igor Gnatenko <ignatenko src gnome org>
src/resources/snippets/python.snippets | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/resources/snippets/python.snippets b/src/resources/snippets/python.snippets
index 568debb..96bfab7 100644
--- a/src/resources/snippets/python.snippets
+++ b/src/resources/snippets/python.snippets
@@ -1,3 +1,6 @@
+snippet python
+ #!/usr/bin/env python
+ $0
snippet gpl
# ${1:$filename}
#
@@ -34,3 +37,20 @@ snippet lgpl
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
$0
+snippet import
+ import $0
+snippet from
+ from ${1} import $0
+snippet def
+ def ${1:function}(${2}):
+ $0
+snippet class
+ class ${1:Foo}(${2:object}):
+ def __init__(self{3}):
+ $0
+snippet main
+ def main():
+ $0
+
+ if __name__ == "__main__":
+ main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]