aboutsummaryrefslogtreecommitdiffstats
path: root/sets.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-01-21 00:26:27 +0100
committerMattias Andrée <maandree@operamail.com>2013-01-21 00:26:27 +0100
commit07dc7930866243b2ce0da71b589629b779c87886 (patch)
tree2199a6ab4c9a3c29c58f41f5d60b76b1b02b70cd /sets.py
parentchmod (diff)
downloadsets-07dc7930866243b2ce0da71b589629b779c87886.tar.gz
sets-07dc7930866243b2ce0da71b589629b779c87886.tar.bz2
sets-07dc7930866243b2ce0da71b589629b779c87886.tar.xz
license stuff
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'sets.py')
-rwxr-xr-xsets.py43
1 files changed, 42 insertions, 1 deletions
diff --git a/sets.py b/sets.py
index 9a514ae..dae29bd 100755
--- a/sets.py
+++ b/sets.py
@@ -3,7 +3,7 @@
'''
sets – The practical way to do set operations on sets of lines in the shell
-Copyright © 2012 Mattias Andrée (maandree@kth.se)
+Copyright © 2012, 2013 Mattias Andrée (maandree@member.fsf.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,10 +21,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
+
def print(text = '', end = '\n'):
sys.stdout.buffer.write((str(text) + end).encode('utf-8'))
+if len(sys.argv) != 1:
+ sys.stdout.buffer.flush()
+ exit(0)
+elif sys.argv[1].startswith('-'):
+ if sys.argv[1] in ('-c', '--copying', '--copyright'):
+ print()
+ print()
+ print('sets – The practical way to do set operations on sets of lines in the shell')
+ print()
+ print('Copyright © 2012, 2013 Mattias Andrée (maandree@member.fsf.org)')
+ print()
+ print('This program is free software: you can redistribute it and/or modify')
+ print('it under the terms of the GNU General Public License as published by')
+ print('the Free Software Foundation, either version 3 of the License, or')
+ print('(at your option) any later version.')
+ print()
+ print('This program is distributed in the hope that it will be useful,')
+ print('but WITHOUT ANY WARRANTY; without even the implied warranty of')
+ print('MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the')
+ print('GNU General Public License for more details.')
+ print()
+ print('You should have received a copy of the GNU General Public License')
+ print('along with this program. If not, see <http://www.gnu.org/licenses/>.')
+ print()
+ print()
+ elif sys.argv[1] in ('-w', '--warranty'):
+ print()
+ print()
+ print('This program is distributed in the hope that it will be useful,')
+ print('but WITHOUT ANY WARRANTY; without even the implied warranty of')
+ print('MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the')
+ print('GNU General Public License for more details.')
+ print()
+ print()
+ else:
+ ;
+ sys.stdout.buffer.flush()
+ exit(0)
+
+
class Set():
def __init__(self):
self.inv = False