Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'defaults': 0.07; 'result,': 0.07; 'back-end': 0.09; 'pointers': 0.09; 'martin': 0.11; 'gui': 0.12; "wouldn't": 0.14; 'cli': 0.16; 'fancy': 0.16; 'finney': 0.16; 'handling,': 0.16; 'incorrect': 0.16; 'letting': 0.16; 'merely': 0.16; 'sane': 0.16; 'subject:Two': 0.16; 'subject:questions': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'basically': 0.19; 'seems': 0.21; 'input': 0.22; 'programming': 0.22; 'previously': 0.22; 'putting': 0.22; 'to:name :python-list@python.org': 0.22; 'error': 0.23; 'entries': 0.24; 'errors.': 0.24; 'frameworks': 0.24; 'precise': 0.24; 'simpler': 0.24; "i've": 0.25; 'options': 0.25; 'handling': 0.26; 'right.': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'correct': 0.29; 'appreciated.': 0.29; 'generally': 0.29; "doesn't": 0.30; '(like': 0.30; 'errors': 0.30; 'work.': 0.31; 'getting': 0.31; 'easier': 0.31; 'towards': 0.31; 'catching': 0.31; 'received:192.168.1.3': 0.31; 'writes:': 0.31; 'anyone': 0.31; 'this.': 0.32; 'interface': 0.32; 'projects.': 0.33; 'tool': 0.35; 'something': 0.35; 'done.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'done': 0.36; 'doing': 0.36; 'effort': 0.37; 'so,': 0.37; 'easily': 0.37; 'being': 0.38; 'implement': 0.38; 'ben': 0.38; 'form,': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'little': 0.38; 'use.': 0.39; 'to:addr:python.org': 0.39; 'users': 0.40; 'how': 0.40; 'ensure': 0.60; 'matter': 0.61; 'first': 0.61; 'subject:more': 0.64; 'more': 0.64; 'assistance': 0.66; 'here': 0.66; 'targeted': 0.69; 'afaics': 0.84; 'mistake': 0.91; 'rating': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:in-reply-to:references:content-type :mime-version:content-transfer-encoding; bh=0ZnbYCy6UaqQk+/2xeAiVqdrzaqwsyX/RPv8Z3b3J7s=; b=iOwoRJ8hpRHyZz1fMSSfn10s23QtiXDSzTqw4D6r2nksbA/arOuugP6QX3sYm6vuxG NHJm9VxrVdQyh6gxlj2Qswc9nL6UKK+hgA80l/qPZedM+pgLy7EkiR5VYnbGEFfGw3Us Ct2XaYnIO/kTz52UGvVK3IV+L3iL3y2eKxTUWZD5T272CpXZBv+g3OyiX0aIQRALxj/1 5q2DWz9UD+KEG/Goza2MHZrqywtUUoskYOYX14Oq9XRQ3k2Vl7B5xWYC3PDyoSNuyPog BWuY1yf0BE3LRM7iI1PyWMCKl4Ih7jXC1mwPZf41bFftySW1LA2tbe2okiYwLU/BKDUQ XW5w== X-Received: by 10.112.202.39 with SMTP id kf7mr3090543lbc.37.1405674486419; Fri, 18 Jul 2014 02:08:06 -0700 (PDT) Subject: Re: Two more newbie questions From: Shieldfire To: "python-list@python.org" Date: Fri, 18 Jul 2014 11:08:02 +0200 In-Reply-To: <85tx6fqdmc.fsf@benfinney.id.au> References: <85tx6fqdmc.fsf@benfinney.id.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405674494 news.xs4all.nl 2895 [2001:888:2000:d::a6]:56399 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74735 On fre, 2014-07-18 at 18:23 +1000, Ben Finney wrote: > Martin S writes: > > > a/ What is the "easiest" way of putting a web interface on this CLI > > application. I've been looking at various web frameworks but that > > seems pretty much targeted more towards larger projects. Not "slapping > > a gui" on a cli application. > > Any pointers and suggestions appreciated. > > My suggestion: Have a firmer idea of what you want the UI to do. > > So, if by “slap a GUI onto” you mean something that is a no-frills > plain-HTML form, with essentially no assistance for the user and no > error handling, this will be a lot simpler to implement than something > easier for the human to use. Pretty much this. Because anyone using the tool would understand what to enter. There are things like opponent, result, tournament and rating without which there wouldn't be a need to use the tool in the first place. The only fancy thing I've done in the cli version is for it to remember some options the users has made previously (like Tournament defaults to previous post when entering several games) > > > b/ Catching user input errors. What is generally the best way of > > catching those and doing something sane with it. Entering "asdf" > > instead of a rating (like 2014) pretty much kills the little tool > > horribly. > > Right. Handling errors is very much a matter of UX policy for the > application, and can easily consume far more of the programming effort > than merely getting the back-end processing done. > > So again, the work to be done here is less Python-specific and much more > about being tediously precise about how you want the user experience to > work. Basically afaics at this time it is to ensure someone doesn't enter an incorrect value by mistake (like '' for result, or rating without it being an integer) and then letting the user correct the entries before committed. /Martin S