Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93891
| Return-Path | <rosuav@gmail.com> |
|---|---|
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; '16,': 0.03; 'stops': 0.07; 'subject:test': 0.07; 'cc:addr:python-list': 0.09; 'blocked': 0.09; 'spawn': 0.09; 'thread': 0.10; 'extensions': 0.13; 'wed,': 0.15; 'intermediate': 0.15; 'languages,': 0.15; 'thu,': 0.15; 'example)': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:Problem': 0.16; 'subject:case': 0.16; 'subject:simple': 0.16; 'wrote:': 0.16; 'obviously': 0.16; 'frameworks': 0.18; 'stick': 0.18; 'test.': 0.18; '>>>': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'saying': 0.22; 'am,': 0.23; 'seems': 0.23; 'header:In-Reply- To:1': 0.24; "i've": 0.25; 'chris': 0.26; 'figure': 0.27; 'parameters': 0.27; 'message-id:@mail.gmail.com': 0.27; 'pieces': 0.27; 'values': 0.28; 'larry': 0.29; "i'm": 0.30; 'print': 0.30; 'server.': 0.30; 'code': 0.30; '15,': 0.30; 'another': 0.32; "can't": 0.32; 'point': 0.33; 'instead,': 0.33; 'server': 0.34; 'gets': 0.35; 'received:google.com': 0.35; 'on,': 0.35; 'jason': 0.35; 'something': 0.35; 'but': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'method': 0.37; 'doing': 0.38; 'several': 0.38; 'test': 0.39; "didn't": 0.39; 'subject:with': 0.40; 'still': 0.40; 'some': 0.40; 'press': 0.61; 'making': 0.62; 'places': 0.64; 'intent': 0.66; 'python-list': 0.66; 'here': 0.66; 'results': 0.66; 'cut': 0.67; 'subject:. ': 0.67; 'study': 0.70; 'jul': 0.72; 'yourself': 0.73; 'calculations': 0.84; 'chrisa': 0.84; 'commenting': 0.84; 'etc),': 0.84; 'out!': 0.84; 'trick,': 0.84; 'to:none': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=eoGkqhTyEI8PB5LikmTJ2BX9o50AbnqSHzCzghw70e4=; b=bShxsKwmEZLVOA2NYFpw/hXpVL+X0fKx3ZOAamOuJuTEaAraNLODwGvLRVzOtg6jRX l9iginzuzKIOGBqXe7Ybaa0/KrJucddFY/zhEoy35bAlZjOIpsaZI1bnznvI8ab6c/ye Cv74G3k9u/V0huk1cFqe/sGNp69ZBvYwKcxi0s7JtOMchxTXqCwGif7goEtfHLyNsPsp pUMPxYLAALz6ssd8FjQCcjIJgh65qj9yKW3bhxZegRTZ93nir2GfLknZCjMBxJwV10EP 8eYs5a1yEUfahc4c3wqFcbLa2PdevoOTjgC2rB9JLJ15HDZk4l/GJTOcgCJzxw+8JIkv LAxw== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.7.104 with SMTP id i8mr1537963iga.50.1437016288425; Wed, 15 Jul 2015 20:11:28 -0700 (PDT) |
| In-Reply-To | <79mdneVqW9UGgzrInZ2dnUU7-cOdnZ2d@giganews.com> |
| References | <0165e508-b3b4-4a95-b1bb-e115893056f8@googlegroups.com> <mailman.539.1436962316.3674.python-list@python.org> <79mdneVqW9UGgzrInZ2dnUU7-cOdnZ2d@giganews.com> |
| Date | Thu, 16 Jul 2015 13:11:28 +1000 |
| Subject | Re: Noob in Python. Problem with fairly simple test case |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.553.1437016291.3674.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1437016291 news.xs4all.nl 2828 [2001:888:2000:d::a6]:45369 |
| X-Complaints-To | abuse@xs4all.nl |
| Path | csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.91.MISMATCH!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
| Xref | csiph.com comp.lang.python:93891 |
Show key headers only | View raw
On Thu, Jul 16, 2015 at 1:01 PM, Larry Hudson via Python-list
<python-list@python.org> wrote:
> On 07/15/2015 05:11 AM, Chris Angelico wrote:
>>
>> On Wed, Jul 15, 2015 at 9:44 PM, Jason P. <suscricions@gmail.com> wrote:
>>>
>>> I can't understand very well what's happening. It seems that the main
>>> thread gets blocked listening to the web server. My intent was to spawn
>>> another process for the server independent of the test. Obviously I'm doing
>>> something wrong. I've made several guesses commenting pieces of code
>>> (tearDown method for example) but I didn't manage to solve the problem(s).
>>>
>>
>> When you find yourself making guesses to try to figure out what's
>> going on, here are two general tips:
>>
>> 1) Cut out as many pieces as you can. Test one small thing at a time.
>> 2) If In Doubt, Print It Out! Stick print() calls into the code at key
>> places, displaying the values of parameters or the results of
>> intermediate calculations - or just saying "Hi, I'm still here and I'm
>> running!".
>>
> In addition to using print(), in some places I like using input() instead,
> as in:
> input('x={}, y={} --> '.format(x, y))
> Then the program stops at that point so you can study it.
> To continue just press <Enter>, or Ctrl-C to abort.
That's a neat trick, as long as you actually do have a console. IIDPIO
is extremely general (works across languages, across frameworks (eg a
web server), etc), but these kinds of extensions are pretty handy when
they make sense.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Noob in Python. Problem with fairly simple test case "Jason P." <suscricions@gmail.com> - 2015-07-15 04:44 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-15 22:11 +1000
Re: Noob in Python. Problem with fairly simple test case Larry Hudson <orgnut@yahoo.com> - 2015-07-15 20:01 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-16 13:11 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-15 20:33 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-16 13:44 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 13:03 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-17 06:11 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 13:30 -0700
Re: Noob in Python. Problem with fairly simple test case Emile van Sebille <emile@fenx.com> - 2015-07-16 14:27 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-17 09:24 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 17:30 -0700
Re: Noob in Python. Problem with fairly simple test case Steven D'Aprano <steve@pearwood.info> - 2015-07-17 12:44 +1000
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-17 13:01 +1000
Re: Noob in Python. Problem with fairly simple test case Steven D'Aprano <steve@pearwood.info> - 2015-07-17 16:47 +1000
Re: Noob in Python. Problem with fairly simple test case wxjmfauth@gmail.com - 2015-07-17 02:15 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-17 20:57 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 21:15 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-17 15:16 +1000
Re: Noob in Python. Problem with fairly simple test case Steven D'Aprano <steve@pearwood.info> - 2015-07-17 16:38 +1000
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-17 10:57 -0700
Re: Noob in Python. Problem with fairly simple test case Laura Creighton <lac@openend.se> - 2015-07-17 22:38 +0200
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-18 14:12 -0700
Re: Noob in Python. Problem with fairly simple test case Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-17 23:03 +0100
Re: Noob in Python. Problem with fairly simple test case Terry Reedy <tjreedy@udel.edu> - 2015-07-17 18:45 -0400
Re: Noob in Python. Problem with fairly simple test case wxjmfauth@gmail.com - 2015-07-18 00:30 -0700
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-18 16:18 -0700
Re: Noob in Python. Problem with fairly simple test case Laura Creighton <lac@openend.se> - 2015-07-19 11:09 +0200
Re: Noob in Python. Problem with fairly simple test case Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-19 10:25 -0700
Re: Noob in Python. Problem with fairly simple test case MRAB <python@mrabarnett.plus.com> - 2015-07-19 18:45 +0100
Re: Noob in Python. Problem with fairly simple test case Laura Creighton <lac@openend.se> - 2015-07-19 19:50 +0200
Off-topic: Europe [was Re: Noob in Python. Problem with fairly simple test case] Steven D'Aprano <steve@pearwood.info> - 2015-07-20 12:30 +1000
Re: Noob in Python. Problem with fairly simple test case Emile van Sebille <emile@fenx.com> - 2015-07-17 16:15 -0700
Re: Noob in Python. Problem with fairly simple test case Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-17 08:26 -0400
Re: Noob in Python. Problem with fairly simple test case Larry Hudson <orgnut@yahoo.com> - 2015-07-16 20:49 -0700
Re: Noob in Python. Problem with fairly simple test case "Jason P." <suscricions@gmail.com> - 2015-07-21 10:38 -0700
Re: Noob in Python. Problem with fairly simple test case Chris Angelico <rosuav@gmail.com> - 2015-07-22 03:48 +1000
csiph-web