mirror of
https://github.com/erkin/ponysay.git
synced 2025-03-21 03:07:11 +01:00
whops
This commit is contained in:
parent
e27f83da41
commit
1ea6043b1d
1 changed files with 13 additions and 1 deletions
14
ponysay.py
14
ponysay.py
|
@ -27,6 +27,12 @@ The directory where ponysay is installed, this is modified when building with ma
|
||||||
INSTALLDIR = '/usr'
|
INSTALLDIR = '/usr'
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
The user's home directory
|
||||||
|
'''
|
||||||
|
HOME = os.environ['HOME']
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY)
|
The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY)
|
||||||
'''
|
'''
|
||||||
|
@ -65,7 +71,13 @@ parser.add_argument('message', nargs = '?', help = 'message to ponysay')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
This is the mane class of ponysay
|
||||||
|
'''
|
||||||
class ponysay():
|
class ponysay():
|
||||||
|
'''
|
||||||
|
Starts the part of the program the arguments indicate
|
||||||
|
'''
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
if args.list: self.list()
|
if args.list: self.list()
|
||||||
elif args.linklist: self.linklist()
|
elif args.linklist: self.linklist()
|
||||||
|
@ -80,7 +92,7 @@ class ponysay():
|
||||||
def __getponypath(self, names = None):
|
def __getponypath(self, names = None):
|
||||||
ponies = {}
|
ponies = {}
|
||||||
|
|
||||||
if names != None:
|
if not names == None:
|
||||||
for name in names:
|
for name in names:
|
||||||
if os.path.isfile(name):
|
if os.path.isfile(name):
|
||||||
return name
|
return name
|
||||||
|
|
Loading…
Add table
Reference in a new issue