I am trying to write a python program, and trying to learn classes. My program is as follows:
class Account():
def __init__(self, name, account_number, initial_amount, transactions):
self.name = name
self.no = account_number
self.balance = initial_amount
self.transactions = 0
def deposit(self, amount):
self.balance += amount
self.transactions += 1
def withdraw(self, amount):
self.balance -= amount
self.transactions += 1
def dump(self):
s = '$s, %s, balance: %s, number of transactions: %s' %\
(self.name, self.no, self.balance, self.transactions)
print s
In terminal, when i am in the folder the python program is located, I try to write from classes import Account to test my program, but the error code I get is: from: can't read /var/mail/classes. What does this mean, and how do I fix it?