Skip to content

Instantly share code, notes, and snippets.

@hogjonny
Created November 10, 2014 20:13
Show Gist options
  • Save hogjonny/5d31d9b6869c8bd6bc79 to your computer and use it in GitHub Desktop.
Save hogjonny/5d31d9b6869c8bd6bc79 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#coding:utf-8
# -- This line is 75 characters -------------------------------------------
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
# fileTemplate.py
# This is a template formatting for new files.
# version: 0.1
# date: 6/6/2013
# author: jGalloway
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
"""
Docstring Comments: This is just a template file.
Copy this template for creating a new file
"""
# -------------------------------------------------------------------------
#Imports, import built-in, then third-party, then path and your own modules.
import os
# -------------------------------------------------------------------------
###########################################################################
## This is a code block
# -------------------------------------------------------------------------
class Foo():
"""
This is a Class, it creates a Foo object... which does nothing really
"""
#----------------------------------------------------------------------
def __init__(self):
'''Class __init__'''
#This calls a class method
self.methodA(self)
#This calls another class
self.methodB(self)
#----------------------------------------------------------------------
def methodA(self):
'''This method does nothing really'''
#The program buttons
print 'I am Foo.methodA'
#----------------------------------------------------------------------
def methodB(self):
'''This method does nothing really'''
#The program buttons
print 'I am Foo.methodB'
# -------------------------------------------------------------------------
###########################################################################
## This is a code block
# -------------------------------------------------------------------------
def main():
"""Main() function, does nothing. """
# create an object from Foo Class
myFoo = Foo()
# additional code goes here
pass
#
sys.exit(app.exec_())
# -------------------------------------------------------------------------
# direct call
if __name__ == "__main__" :
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment