Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'essentially': 0.04; 'made.': 0.07; 'back-end': 0.09; 'pointers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'martin': 0.11; 'gui': 0.12; 'brothers': 0.16; 'cli': 0.16; 'finney': 0.16; 'handling,': 0.16; 'merely': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sane': 0.16; 'subject:Two': 0.16; 'subject:questions': 0.16; 'threw': 0.16; 'do.': 0.18; 'seems': 0.21; 'input': 0.22; 'programming': 0.22; 'putting': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'errors.': 0.24; 'frameworks': 0.24; 'precise': 0.24; 'simpler': 0.24; "i've": 0.25; 'handling': 0.26; 'right.': 0.26; 'header:X-Complaints- To:1': 0.27; 'idea': 0.28; 'appreciated.': 0.29; 'generally': 0.29; '(like': 0.30; 'errors': 0.30; "i'm": 0.30; 'work.': 0.31; 'getting': 0.31; 'easier': 0.31; 'towards': 0.31; 'catching': 0.31; 'writes:': 0.31; 'interface': 0.32; 'projects.': 0.33; 'tool': 0.35; 'something': 0.35; 'done.': 0.35; 'but': 0.35; '8bit%:17': 0.36; 'done': 0.36; 'doing': 0.36; 'changing': 0.37; '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; 'little': 0.38; 'expensive': 0.39; 'use.': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'guy': 0.60; 'matter': 0.61; 'making': 0.63; 'subject:more': 0.64; 'more': 0.64; 'skip:\xe2 10': 0.65; 'assistance': 0.66; 'here': 0.66; 'targeted': 0.69; 'expectations': 0.74; 'fortunately,': 0.84; 'received:125': 0.84; 'difficult,': 0.91; 'rating': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Two more newbie questions Date: Fri, 18 Jul 2014 18:23:39 +1000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:7TAcqpJqRX4d1VIZaK+sXyDrX2o= 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: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1405671832 news.xs4all.nl 2940 [2001:888:2000:d::a6]:47800 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:74733 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. UI design is a very difficult problem; you are essentially making all kidns of compromises because humans and their expectations are messy, unpredictable, and expensive to work with. 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. > 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. It's difficult, exacting, fiddly work. Fortunately, the more exact you can be, the more likely a specific recommendation can be made. -- \ “I knew things were changing when my Fraternity Brothers threw | `\ a guy out of the house for mocking me because I'm gay.” | _o__) —postsecret.com, 2010-01-19 | Ben Finney