#!/usr/bin/python
class Employee:
'Common base class for all employees'
empCount = 0
def __init__(self, name, salary):
self.name = name
self.salary = salary
Employee.empCount += 1
def displayCount(self):
print "Total Employee %d" % Employee.empCount
def displayEmployee(self):
print "Name : ", self.name, ", Salary: ", self.salary
"This would create first object of Employee class"
emp1 = Employee("Zara", 2000)
"This would create second object of Employee class"
emp2 = Employee("Manni", 5000)
emp1.displayEmployee()
emp2.displayEmployee()
print "Total Employee %d" % Employee.empCount
#!/usr/bin/env python
"""
Basic script to create an empty python package containing one module
"""
from skeleton import Skeleton, Var
class BasicModule(Skeleton):
"""
Create an empty module with its etup script and a README file.
"""
src = 'basic-module'
variables = [
Var('module_name'),
Var('author'),
Var('author_email'),
]
def main():
"""Basic command line bootstrap for the BasicModule Skeleton"""
BasicModule.cmd()
if __name__ == '__main__':
main()