From 49b3f80f8a583df5eae72d559c317571e2491716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Sat, 22 Dec 2012 00:16:43 +0100 Subject: [PATCH] m bracket + syntax fix + installation error fix and verboseness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- manuals/ponysay.texinfo | 4 ++-- ponysay.py | 2 +- setup.py | 17 ++++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/manuals/ponysay.texinfo b/manuals/ponysay.texinfo index d7df93c7..b2df06b6 100644 --- a/manuals/ponysay.texinfo +++ b/manuals/ponysay.texinfo @@ -1529,9 +1529,9 @@ to your @file{~/.bashrc} file. @example [[ ! "$COLORTERM" = "" ]] && function ponysay - { + @{ exec ponysay "$@@" | cat | cat | cat | cat - } + @} @end example @end cartouche diff --git a/ponysay.py b/ponysay.py index 9fcc5b2f..c4651c9b 100755 --- a/ponysay.py +++ b/ponysay.py @@ -198,7 +198,7 @@ class Ponysay(): def share(file): - return [parsefile(item) + file for item in [ + return [(parsefile(item) + file) for item in [ '$XDG_DATA_HOME/ponysay/', '$HOME/.local/share/ponysay/', '/usr/share/ponysay/', diff --git a/setup.py b/setup.py index e9a0441d..8fc1dcf1 100755 --- a/setup.py +++ b/setup.py @@ -490,13 +490,6 @@ class Setup(): if fileout is not None: fileout.close() if filein is not None: filein .close() - for sharedir in [sharedir[0] for sharedir in sharedirs]: - for sharefile in os.listdir(conf[sharedir]): - if sharefile.endswith('.pony') and (sharefile != '.pony'): - for toolcommand in ('--dimensions', '--metadata'): - Popen(['./ponysay-tool.py', toolcommand, conf[sharedir]], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() - break - for shell in [item[0] for item in shells]: if conf[shell] is not None: for command in commands: @@ -542,6 +535,16 @@ class Setup(): finally: if ponymap is not None: ponymap.close() + + for sharedir in [sharedir[0] for sharedir in sharedirs]: + if os.path.isdir(sharedir): + for sharefile in os.listdir(sharedir): + if sharefile.endswith('.pony') and (sharefile != '.pony'): + sharefile = sharedir + '/' + sharefile + for toolcommand in ('--dimensions', '--metadata'): + print('%s, %s, %s' % ('./ponysay-tool.py', toolcommand, sharefile)) + Popen(['./ponysay-tool.py', toolcommand, sharefile], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate() + print()