aboutsummaryrefslogtreecommitdiff
path: root/pyfarbpracht
diff options
context:
space:
mode:
authorpux <pux@pux.dom>2021-02-04 15:16:23 +0100
committerpux <pux@pux.dom>2021-02-04 15:16:23 +0100
commitdf9b0d6f17dcd498458076dc5e0f9ffa10c44ef6 (patch)
tree2b63337bafc50ac79bbb670bbc3c9d5bc30ae1e8 /pyfarbpracht
parentfefe77825d02c6b4c801ee3d69726f52663e368f (diff)
downloadpyfarbpracht-df9b0d6f17dcd498458076dc5e0f9ffa10c44ef6.tar.gz
pyfarbpracht-df9b0d6f17dcd498458076dc5e0f9ffa10c44ef6.tar.bz2
pyfarbpracht-df9b0d6f17dcd498458076dc5e0f9ffa10c44ef6.zip
remove mandatory msg arg for hex color test printc
Diffstat (limited to 'pyfarbpracht')
-rwxr-xr-xpyfarbpracht/printc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pyfarbpracht/printc.py b/pyfarbpracht/printc.py
index 3ac38a2..28e5dd6 100755
--- a/pyfarbpracht/printc.py
+++ b/pyfarbpracht/printc.py
@@ -4,7 +4,7 @@ import sys
import pyfarbpracht as fp
def usage():
- print('usage: ' + sys.argv[0] + ' \"#abcdef\" msg')
+ print('usage: ' + sys.argv[0] + ' \"#abcdef\" [msg]')
print('You need to escape the hex color')
sys.exit(1)
@@ -25,6 +25,10 @@ except:
print('Color is not a valid hex string')
sys.exit(1)
-msg = sys.argv[2]
+if len(sys.argv) < 3:
+ msg = color
+else:
+ args = sys.argv[2:]
+ msg = ' ' .join(args)
fp.printc(color, msg, enable_color=True)
in each repos: see "about"-tab (if existing) for more details / README.
mailto contact at omeckman dot net
all timestamps in UTC (German winter time: UTC+01:00, summer time: UTC+02:00)
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa