diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-01-21 00:26:27 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-01-21 00:26:27 +0100 |
| commit | 07dc7930866243b2ce0da71b589629b779c87886 (patch) | |
| tree | 2199a6ab4c9a3c29c58f41f5d60b76b1b02b70cd /sets.py | |
| parent | chmod (diff) | |
| download | sets-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-x | sets.py | 43 |
1 files changed, 42 insertions, 1 deletions
@@ -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 |
