summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-19 21:09:19 +0300
committerLars Wirzenius <liw@liw.fi>2017-08-19 21:09:19 +0300
commit83239e0d3844d67eed3d109d21f6bd8c3a5adf8c (patch)
tree74af250835b03dfce49818c56e1dd83fb4b85698
parent891f4bb2e7a1e702a165836387d9372db35567f9 (diff)
downloadcliapp-83239e0d3844d67eed3d109d21f6bd8c3a5adf8c.tar.gz
Drop: example3.py
It would need trickery to work for both py2 and py3, because it uses urlparse. I'd rather have a simpler example and not distract readers with that kind of thing.
-rw-r--r--example3.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/example3.py b/example3.py
deleted file mode 100644
index e0965da..0000000
--- a/example3.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2012 Lars Wirzenius
-#
-# 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-'''Example for cliapp framework.
-
-Demonstrate the compute_setting_values method.
-
-'''
-
-
-import urlparse
-
-import cliapp
-
-
-class ExampleApp(cliapp.Application):
-
- '''A little fgrep-like tool.'''
-
- def add_settings(self):
- self.settings.string(['url'], 'a url')
- self.settings.string(['protocol'], 'the protocol')
-
- def compute_setting_values(self, settings):
- if not self.settings['protocol']:
- schema = urlparse.urlparse(self.settings['url'])[0]
- self.settings['protocol'] = schema
-
- def process_args(self, args):
- return
-
-
-app = ExampleApp()
-app.run()