Re: [Tutor] More than one thing at a time?

2005-09-30 Thread Kent Johnson
Joseph Quigley wrote: > Hi, I've got a problem: > I've got a semi working IRC client. There's a function that is for > receiving and one for sending. How can I have a loop where I can receive > messages, yet still have a send prompt? you need to learn about threads. which I don't seem to have th

Re: [Tutor] lonely snowman

2005-09-30 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hello > > I have a snowman who would like a nose. I have tried the following to make > a triangle and all I get is a little green line. would anyone have any > suggestions as to why? > > > from graphics import * > > def main(): > win = GraphWin("Triangle") > >

[Tutor] lonely snowman

2005-09-30 Thread andrade1
Hello I have a snowman who would like a nose. I have tried the following to make a triangle and all I get is a little green line. would anyone have any suggestions as to why? from graphics import * def main(): win = GraphWin("Triangle") triangle = Polygon(Point(4,8), Point(2,10), Point

[Tutor] Request for newbies :-)

2005-09-30 Thread Michael Sparks
[ This /may/ be very "off-netiquette" for the tutor list. If it is, I apologise in advance. ] Hi, One of the aims of the project I'm working on is that it aims to make writing programs which are inherently (and potentially) highly parallel/concurrent easy & safe to work with. We've tested o

Re: [Tutor] Alan's responce frustrated beginner (fwd)

2005-09-30 Thread Danny Yoo
[Rosalee] >>> I want to save this file, import it and make the changes, eggs = >>> toast, . spam = jelly and change the values if needed. [Danny] >> It sounds like you're still stuck trying to input programs into Python. >> Are you using a "programming text editor"? If not, then you may want >>

Re: [Tutor] Book recommendations

2005-09-30 Thread Andrew P
Thanks Danny.  That outline of How to Solve It  reminded me of an idea that resonated strongly with me in Programming Pearls, and I just looked it up and sure enough,  Bentley was referencing the same Polya book: "Most of the structures exemplify what Polya calls the Inventor's Paradox in his How

Re: [Tutor] File mode r+

2005-09-30 Thread Shitiz Bansal
Hi, Thats strange. Maybe me being on windows makes the diference. Here is the exact IDLE session to clarify: IDLE 1.1 No Subprocess >>> >>> file1=open("aa.txt",'r+') >>> file1.read() 'abcd\nefgh\nijkl\nmnop\nqrst\nuvwx\nyx12\n' >>> file1.close() >>> file1=open("aa.txt",'r+') >

Re: [Tutor] find data in html file

2005-09-30 Thread lmac
> > >Message: 5 >Date: Fri, 30 Sep 2005 10:32:41 -0400 >From: Kent Johnson <[EMAIL PROTECTED]> >Subject: Re: [Tutor] find data in html file >Cc: tutor@python.org >Message-ID: <[EMAIL PROTECTED]> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >lmac wrote: > > >>> It's not this simp

Re: [Tutor] find data in html file

2005-09-30 Thread Andrew P
It's free now to use the API.  You just "self-certify" and get 10,000 calls a month. Imac, if you use the API, let me save you some trouble.  REST is useless, SOAP is overly complicated, which leaves XML over HTTP which is really quite nice.  I am not speaking generally, but talking about the ebay

Re: [Tutor] Challenge [was Re: Why won't it enter the quiz?]

2005-09-30 Thread Nathan Pinno
Lisa and all,   I got rid of that portion of my site. All that's there now is the e-book publishing part of my site.   Nathan Pinno - Original Message - From: Lisa Fukui To: Nathan Pinno Sent: Friday, September 30, 2005 11:22 AM Subject: Re: [Tutor] Challenge [was Re:

Re: [Tutor] drawing a face

2005-09-30 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > also I know i want an oval for the month but I only need half of one how > would i just get half of the oval? You are using John Zelle's graphics module, right? I don't think that module supports drawing part of an oval. As a work-around you could try drawing the whole

Re: [Tutor] drawing a face

2005-09-30 Thread dataw0lf
[EMAIL PROTECTED] wrote: > NameError: global name 'Cirlce' is not defined Looks like you misspelled 'Circle' -- Joshua Simpson -- dataw0lf.org Lead Network Administrator/Engineer Aero-Graphics Inc. [EMAIL PROTECTED] ___ Tutor maillist - Tutor@pyth

Re: [Tutor] drawing a face

2005-09-30 Thread Harper, Gina
Looks like you misspelled circle... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 30, 2005 12:19 PM To: tutor@python.org Subject: [Tutor] drawing a face Hello I am trying to draw a basic face with eyes, nose, and a mouth. I keep receiving

[Tutor] drawing a face

2005-09-30 Thread andrade1
Hello I am trying to draw a basic face with eyes, nose, and a mouth. I keep receiving the following error message: >>> Traceback (most recent call last): File "C:\Documents and Settings\Michele\Desktop\face", line 26, in ? main() File "C:\Documents and Settings\Michele\Desktop\face", line

Re: [Tutor] Problem with BeautifulSoup

2005-09-30 Thread Bernard Lebel
Nice! Thanks Kent Bernard On 9/30/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Oh, what if you try > > class MyBeautifulSoup(BeautifulSoup.BeautifulStoneSoup): > NESTABLE_BLOCK_TAGS = ['sceneobject', 'parameters', 'parameter', 'shader'] > NESTABLE_TAGS = buildTagMap([], NESTABLE_BLOCK

Re: [Tutor] Problem with BeautifulSoup

2005-09-30 Thread Kent Johnson
Oh, what if you try class MyBeautifulSoup(BeautifulSoup.BeautifulStoneSoup): NESTABLE_BLOCK_TAGS = ['sceneobject', 'parameters', 'parameter', 'shader'] NESTABLE_TAGS = buildTagMap([], NESTABLE_BLOCK_TAGS) Bernard Lebel wrote: > I know I should be doing that. But somehow it doesn't work (

Re: [Tutor] Finding difference in two .gif

2005-09-30 Thread Ertl, John
All, Well I found the answer...getbox() gave me the bounding box and then I could just plot that portion of the two images. Python 2.4, PIL 1.1.5 The simple code I have tried: import Image import ImageChops file1 = Image.open("/home/PT04_RH.2005072300.gif") file2 = Image.open("/home/PT04_RH.

Re: [Tutor] Problem with BeautifulSoup

2005-09-30 Thread Bernard Lebel
I know I should be doing that. But somehow it doesn't work (ie I keep getting mangled XML tree). Bernard On 9/30/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Bernard Lebel wrote: > > Hi Kent, > > > > Well I have decided to get this sorted once and for all. Not that I > > don't like ElementTree

Re: [Tutor] Book recommendations?

2005-09-30 Thread Andrew P
Thanks Mike.  Many a google search has landed me on his site, and I always end up reading more than what I landed on :) All of the above are great picks. I'd also recommend Joel On Software. It's acollection of his articles from his web site. ___ Tutor

Re: [Tutor] Book recommendations?

2005-09-30 Thread Andrew P
Thanks for the recommendations, Kent. Kent wrote: How could I forget the Gang of Four? This is the book that started the Design Patterns movement. Gamma, Helm, Johnson & Vlissides, Design Patternshttp://www.aw-bc.com/catalog/academic/product/0,1144,0201633612,00.html I probably shouldn't forget

Re: [Tutor] Problem with BeautifulSoup

2005-09-30 Thread Kent Johnson
Bernard Lebel wrote: > Hi Kent, > > Well I have decided to get this sorted once and for all. Not that I > don't like ElementTree, but the fack is that BeautifulSoup uses a near > identical syntax to the 3D application SDK's object model I'm using it > with, making interaction between the 3D and th

Re: [Tutor] Problem with BeautifulSoup

2005-09-30 Thread Bernard Lebel
Hi Kent, Well I have decided to get this sorted once and for all. Not that I don't like ElementTree, but the fack is that BeautifulSoup uses a near identical syntax to the 3D application SDK's object model I'm using it with, making interaction between the 3D and the XML extremely transparent. Anyw

Re: [Tutor] find data in html file

2005-09-30 Thread paul brian
> But to get the data like price,bidders,shipment etc without the official > eBayAPI is hard. > Maybe anyone has a solution made ? Ebay specifically change around their HTML codes, tags and formatting (in quite a clever way) to stop people doing exactly what you are trying to do. I think it cha

Re: [Tutor] find data in html file

2005-09-30 Thread Kent Johnson
lmac wrote: > It's not this simple. The whole thing is that i try to use ebay.de for > fetching websites > when i give an articlenumber. The downloading of the site for a specific > article is no problem. > But to get the data like price,bidders,shipment etc without the official > eBayAPI is har

Re: [Tutor] Book recommendations?

2005-09-30 Thread Mike Hansen
> Subject: > Re: [Tutor] Book recommendations? > From: > Kent Johnson <[EMAIL PROTECTED]> > Date: > Fri, 30 Sep 2005 05:57:51 -0400 > > CC: > Python Tutor list > > > Andrew P wrote: > >> Does anybody have any recommendations for other books on programming >> practices in general? Any fun or

[Tutor] Finding difference in two .gif

2005-09-30 Thread Ertl, John
All, I have two gif images that should be exactly the same...one static and the other recreated from the same data. For months this has been working great but yesterday the "new" image that I made was slightly different. The image size is 4 bytes different. When I look at the image side by sid

Re: [Tutor] find data in html file

2005-09-30 Thread lmac
Date: Wed, 28 Sep 2005 09:25:53 +0100 From: Ed Singleton <[EMAIL PROTECTED]> Subject: Re: [Tutor] find data in html file To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 On 27/09/05, lmac <[EMAIL PROTECTED]> wrote: >> Hi there, >> i have a base-que

Re: [Tutor] Book recommendations?

2005-09-30 Thread Kent Johnson
Kent Johnson wrote: > Some of the highlights from my bookshelf: How could I forget the Gang of Four? This is the book that started the Design Patterns movement. Gamma, Helm, Johnson & Vlissides, Design Patterns http://www.aw-bc.com/catalog/academic/product/0,1144,0201633612,00.html > Beck, Extre

Re: [Tutor] Book recommendations?

2005-09-30 Thread Kent Johnson
Andrew P wrote: > Does anybody have any recommendations for other books on programming > practices in general? Any fun or philosophical reads on software > architecture/design? Some of the highlights from my bookshelf: Hunt & Thomas, The Pragmatic Programmer http://pragmaticprogrammer.com/ppbo

Re: [Tutor] script question

2005-09-30 Thread Kent Johnson
Chris Hallman wrote: > > Thanks for all the input!!! I really appreciate it. I need to post a > correction to my script. What I sent was an early version. I made a few > minor modifications: You don't seem to have incorporated any of the suggestions that you have received! I doubt that a 4000

Re: [Tutor] call a def/class by reference

2005-09-30 Thread alan . gauld
>>On Thursday 29 September 2005 22:26, Alan G wrote: >>> string -> function mapping directly. >>> >>> Its not usually a very useful thing to do >> >This is precisely how shared libraries under linux and IIRC DLLs in >windows work. cf dlopen, dysym in C. No, its completely different. These are not