Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Stephen P. Molnar
On 11/20/2017 10:18 AM, Steven D'Aprano wrote: On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote: I'm not really looking for someone to do the programming for me. I know that the code works, because it did and produced the attached plot. I just don't know why it stopped workin

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Stephen P. Molnar
On 11/20/2017 09:34 AM, William Ray Wing wrote: On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar mailto:s.mol...@sbcglobal.net>> wrote: On 11/19/2017 03:10 PM, William Ray Wing wrote: On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar mailto:s.mol...@sbcglobal.net>> wrote: I have written a sh

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Alan Gauld via Tutor
On 20/11/17 11:24, Steven D'Aprano wrote: On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote: Actually, pasting code etc is safer since the server removes attachments. And while it is supposed to preserve plain text attachments it will throw them away if it sees *anything* tha

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread William Ray Wing
> On Nov 20, 2017, at 9:55 AM, Stephen P. Molnar wrote: > > > On 11/20/2017 09:34 AM, William Ray Wing wrote: [byte] >> As an experiment, I took the code and moved it to my laptop (MacOS, running >> 10.12.6 where there is a complete Anaconda installation that contains >> self-consistent ve

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread William Ray Wing
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote: > > > On 11/19/2017 03:10 PM, William Ray Wing wrote: >>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar >>> wrote: >>> >>> I have written a short Python 3 script to plot three curves (one plot) of >>> data from a FORTRAN program. In

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Steven D'Aprano
On Mon, Nov 20, 2017 at 08:18:41AM -0500, Stephen P. Molnar wrote: > I'm not really looking for someone to do the programming for me. I know > that the code works, because it did and produced the attached plot. I > just don't know why it stopped working. Actually, all of my programming > expe

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Stephen P. Molnar
On 11/20/2017 06:24 AM, Steven D'Aprano wrote: On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote: Actually, pasting code etc is safer since the server removes attachments. And while it is supposed to preserve plain text attachments it will throw them away if it sees *anythin

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Steven D'Aprano
On Mon, Nov 20, 2017 at 10:26:50AM +, Alan Gauld via Tutor wrote: > Actually, pasting code etc is safer since the server removes > attachments. And while it is supposed to preserve plain text > attachments it will throw them away if it sees *anything* > that it thinks looks like binary. Let's

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-20 Thread Alan Gauld via Tutor
I'll echo everything Steve says except: On 20/11/17 00:23, Steven D'Aprano wrote: - Ensure your code and data are ATTACHED to the email as separate files, not copy and pasted into the body. We should be able to save the files directly to our own computers without the risk of introducin

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Steven D'Aprano
On Sun, Nov 19, 2017 at 03:14:11PM -0500, Stephen P. Molnar wrote: [...] > >>I have written a short Python 3 script to plot three curves (one plot) of > >>data from a FORTRAN program. [...] Stephen, please remember that we are volunteers offering services for free, not paid consultants. If you

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Steven D'Aprano
On Sun, Nov 19, 2017 at 04:51:06PM -0500, William Ray Wing wrote: > Unfortunately your mail reader/program has pasted it in as an RTF file > and this makes it almost impossible to look at in a text editor or > hand to the Python interpreter. What we see looks like the following > (I’ve pasted

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Mats Wichmann
On 11/19/2017 09:36 AM, Stephen P. Molnar wrote: > I have written a short Python 3 script to plot three curves (one plot) > of data from a FORTRAN program.  Initially the code worked and produced > the plot which is attached.  I have also attached the code and the input > data, > > In all candor,

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Alan Gauld via Tutor
On 19/11/17 20:14, Stephen P. Molnar wrote: In all candor, I don't have the faintest idea as to whst the problem (or problens) might be and would greatly appreciate a pointer towards the solution. You really need to post the entire error message not just the summary line. Especially since yo

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Stephen P. Molnar
On 11/19/2017 03:10 PM, William Ray Wing wrote: On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar wrote: I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program. Initially the code worked and produced the plot which is attached. I have also attac

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread William Ray Wing
> On Nov 19, 2017, at 3:14 PM, Stephen P. Molnar wrote: > > > On 11/19/2017 03:10 PM, William Ray Wing wrote: >>> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar >>> wrote: >>> >>> I have written a short Python 3 script to plot three curves (one plot) of >>> data from a FORTRAN program. In

Re: [Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread William Ray Wing
> On Nov 19, 2017, at 11:36 AM, Stephen P. Molnar > wrote: > > I have written a short Python 3 script to plot three curves (one plot) of > data from a FORTRAN program. Initially the code worked and produced the plot > which is attached. I have also attached the code and the input data, >

[Tutor] AttributeError: 'BezierPath' object has no attribute '_draw_solid'

2017-11-19 Thread Stephen P. Molnar
I have written a short Python 3 script to plot three curves (one plot) of data from a FORTRAN program. Initially the code worked and produced the plot which is attached. I have also attached the code and the input data, In all candor, I don't have the faintest idea as to whst the problem (or

Re: [Tutor] AttributeError,

2015-08-18 Thread Alan Gauld
On 18/08/15 02:04, Steven D'Aprano wrote: Has anyone else answered this question? I haven't seen a response, but perhaps I missed it. There have been several further mails - some off list. The upshot is that he has submitted what he believes is a working solution to his assignment. -- Alan G

Re: [Tutor] AttributeError,

2015-08-17 Thread Steven D'Aprano
Has anyone else answered this question? I haven't seen a response, but perhaps I missed it. More comments below. On Tue, Aug 11, 2015 at 09:53:03PM -0700, Ltc Hotspot wrote: > Hi Steven, > > Message heard loud and clear: > > Question: What sorted function should I write to produce the desired

Re: [Tutor] AttributeError,

2015-08-12 Thread Ltc Hotspot
Hi Steven, Message heard loud and clear: Question: What sorted function should I write to produce the desired output, below: Desired output: 04 3 06 1 07 1 09 2 10 3 11 6 14 1 15 2 16 4 17 2 18 1 19 1 Latest revised code: count = dict() fname = raw_input("Enter file name: ")# handle = open (f

Re: [Tutor] AttributeError,

2015-08-12 Thread Ltc Hotspot
Steven, Visit the URL links below to view the latest revised code: Output: 09:14:16 Syntax message: val is not defined Raw data code, available at http://tinyurl.com/ob89r9p Embedded data code, available at http://tinyurl.com/qhm4ppq Visualization URL link, available at http://tinyurl.com/ozzmff

Re: [Tutor] AttributeError,

2015-08-11 Thread Steven D'Aprano
On Tue, Aug 11, 2015 at 07:38:21PM -0700, Ltc Hotspot wrote: > Steven, > > Visit the URL links below to view the latest revised code: I don't think so. I don't have access to the web right now, but I do have access to email. And even if I did, I'm lazy and wouldn't follow links and then have to

Re: [Tutor] AttributeError,

2015-08-11 Thread Mark Lawrence
On 12/08/2015 03:01, Steven D'Aprano wrote: On Tue, Aug 11, 2015 at 04:24:39PM -0700, Ltc Hotspot wrote: Hi Everyone, Why is there an AttributeError, line 12, below : 'tuple' object has no attribute 'sort'? Haven't I see this exact same question, complete with solutions, on the python-list ma

Re: [Tutor] AttributeError,

2015-08-11 Thread Steven D'Aprano
On Tue, Aug 11, 2015 at 04:24:39PM -0700, Ltc Hotspot wrote: > Hi Everyone, > > Why is there an AttributeError, line 12, below : 'tuple' object has no > attribute 'sort'? Haven't I see this exact same question, complete with solutions, on the python-list mailing list? The answer found there is

Re: [Tutor] AttributeError,

2015-08-11 Thread Alan Gauld
On 12/08/15 00:24, Ltc Hotspot wrote: Why is there an AttributeError, line 12, below : 'tuple' object has no attribute 'sort'? Having answered that in my last email I just noticed another problem... count = dict() fname = raw_input("Enter file name: ")# handle = open (fname, 'r')# for line i

Re: [Tutor] AttributeError,

2015-08-11 Thread Alan Gauld
On 12/08/15 00:24, Ltc Hotspot wrote: Why is there an AttributeError, line 12, below : 'tuple' object has no attribute 'sort'? Because a tuple has no attribute sort. A tuple is immutable - you can't change it. Therefore, you can't sort it. You can however use the sorted() function on it to re

[Tutor] AttributeError,

2015-08-11 Thread Ltc Hotspot
Hi Everyone, Why is there an AttributeError, line 12, below : 'tuple' object has no attribute 'sort'? count = dict() fname = raw_input("Enter file name: ")# handle = open (fname, 'r')# for line in handle: if line.startswith("From "): address = line.split()[5] line = line.rstri

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-13 Thread Prasad, Ramit
> Please don't top post on this list. Please don't try telling me what to > do or not do. Thanks in anticipation. Oh the irony. Ramit This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and compl

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-13 Thread Mark Lawrence
On 12/06/2014 17:51, jason sam wrote: The last question i hadn't asked yet..and if u are not interested in answering the question then also refrain from commenting please! On Thu, Jun 12, 2014 at 9:47 PM, Mark Lawrence mailto:breamore...@yahoo.co.uk>> wrote: On 12/06/2014 05:51, jason sam w

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-13 Thread Dave Angel
jason sam Wrote in message: > (Please use text mail, as html gets distorted and/or jumbled. Also, many people here cannot see attachments, so you should paste them into your text message. And be sure to put a marker before each file indicating it's original filename) self.update_grid() F

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-13 Thread jason sam
The last question i hadn't asked yet..and if u are not interested in answering the question then also refrain from commenting please! On Thu, Jun 12, 2014 at 9:47 PM, Mark Lawrence wrote: > On 12/06/2014 05:51, jason sam wrote: > >> Hi All, >> I am new to wxPython.I have made a simple GUI that

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-13 Thread jason sam
Thnx for all the suggestions...Now i have made amendments to my program and its working now...but there is a new problem nowI am now calling a python script generated by GNU Radio Companion(for those who know about GRC will understand my question better)...when i press the execute button i get

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Walter Prins
On 12 June 2014 13:11, Steven D'Aprano wrote: > On Thu, Jun 12, 2014 at 11:41:58AM +0100, Walter Prins wrote: > >> (What made you think that modules have a magic method >> start() that causes them to run?) You should probably learn more >> about Python itself, name binding, module objects etc. >

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Steven D'Aprano
On Thu, Jun 12, 2014 at 05:47:23PM +0100, Mark Lawrence wrote: > I suspect that you'll get better answers on the wxpython list, > especially consdiering that you asked there all of two minutes before > asking here. This is not aimed specifically at Mark. Can we please stop chastising people fo

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Mark Lawrence
On 12/06/2014 05:51, jason sam wrote: Hi All, I am new to wxPython.I have made a simple GUI that contains a button and by pressing that button i am calling another .py file(top_block.py)...But i am getting error using the command: top_block.start() The error is: AttributeError: 'module' object

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Alan Gauld
On 12/06/14 05:51, jason sam wrote: Hi All, I am new to wxPython.I have made a simple GUI that contains a button and by pressing that button i am calling another .py file(top_block.py)... No you are not. You are importing it and then trying to access something called start which doesn't exist.

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Steven D'Aprano
On Thu, Jun 12, 2014 at 11:41:58AM +0100, Walter Prins wrote: > (What made you think that modules have a magic method > start() that causes them to run?) You should probably learn more > about Python itself, name binding, module objects etc. That's what this list is for! -- Steven

Re: [Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread Walter Prins
Hi, On 12 June 2014 05:51, jason sam wrote: > > Hi All, > I am new to wxPython.I have made a simple GUI that contains a button and by > pressing that button i am calling another .py file(top_block.py)...But i am > getting error using the command: > > top_block.start() > > The error is: > > Attr

[Tutor] AttributeError: 'module' object has no attribute 'start'

2014-06-12 Thread jason sam
Hi All, I am new to wxPython.I have made a simple GUI that contains a button and by pressing that button i am calling another .py file(top_block.py)...But i am getting error using the command: top_block.start() The error is: AttributeError: 'module' object has no attribute 'start' The code is a

[Tutor] AttributeError:

2013-07-19 Thread Charles McAndrews
Whenever I try to type 'python' into the cmd prompt, it always gives me this error: Traceback (most recent call last): File "C:\Python27\lib\site.py", line 62, in import os File "C:\Python27\lib\os.py", line 398, in import UserDict File "C:\Python27\lib\UserDict.py", line 83, in

Re: [Tutor] AttributeError: 'list' object has no attribute 'find'

2010-12-21 Thread Luke Paireepinart
Read() does return a string. I guess the better question would be... Are you using read? 'cause in the example you sent you used readlines() which returns a list of lines. - Sent from a mobile device with a bad e-mail client. - On Dec 21,

Re: [Tutor] AttributeError: 'list' object has no attribute 'find'

2010-12-21 Thread Alan Gauld
"Ben Ganzfried" wrote 1) Doesn't the read() file object method return the specified characters from the file as a string? Yes 2) If #1 is correct, then why is my variable "source" being viewed as a list as opposed to a string? You are not using read(), you are using readlines() which ret

[Tutor] AttributeError: 'list' object has no attribute 'find'

2010-12-21 Thread Ben Ganzfried
Hey, I keep getting the error above and unfortunately browsing through google and finding similar responses has not been fruitful for me. My code is below and I have marked off the location of the problem in my code. I'm wondering the following: 1) Doesn't the read() file object method return t

Re: [Tutor] AttributeError: Vector instance has no attribute 'Normalize'

2009-11-27 Thread spir
Garrett Hartshaw wrote: > The program I am writing gives the following error message when run. > > Traceback (most recent call last): >   File "./space.py", line 177, in >     main() >   File "./space.py", line 173, in main >     player = Ship("space/models/fighter.3ds", > "space/models/realist

Re: [Tutor] AttributeError: Vector instance has no attribute 'Normalize'

2009-11-27 Thread bob gailer
Garrett Hartshaw wrote: The program I am writing gives the following error message when run. Traceback (most recent call last): File "./space.py", line 177, in main() File "./space.py", line 173, in main player = Ship("space/models/fighter.3ds", "space/models/realistic.bmp", Quatern

[Tutor] AttributeError: Vector instance has no attribute 'Normalize'

2009-11-27 Thread Garrett Hartshaw
The program I am writing gives the following error message when run. Traceback (most recent call last):   File "./space.py", line 177, in     main()   File "./space.py", line 173, in main     player = Ship("space/models/fighter.3ds", "space/models/realistic.bmp", Quaternion(), Vector(0, 0, -30),

Re: [Tutor] AttributeError: 'list' object has no attribute 'capitalize'

2007-06-20 Thread John Fouhy
On 20/06/07, Norman Khine <[EMAIL PROTECTED]> wrote: > My question is how to get all the words in the string to start with > capital letter? Hmm, well the title() function is a new one to me :-) More generally, if we have raw = 'one two three', then I would have done it using raw.split(). i.e.

Re: [Tutor] AttributeError: 'list' object has no attribute 'capitalize'

2007-06-20 Thread Norman Khine
thanks, it is as easy as that ;) Adam A. Zajac wrote: > On Wed, 20 Jun 2007 12:32:53 +0200 > > Norman Khine <[EMAIL PROTECTED]> wrote: > >> My question is how to get all the words in the string to start with >> capital letter? > title() should do it > a = "hello world" a.title()

Re: [Tutor] AttributeError: 'list' object has no attribute 'capitalize'

2007-06-20 Thread Adam A. Zajac
On Wed, 20 Jun 2007 12:32:53 +0200 Norman Khine <[EMAIL PROTECTED]> wrote: > My question is how to get all the words in the string to start with > capital letter? title() should do it >>>a = "hello world" >>>a.title() >>>'Hello World' ___ Tutor maillis

[Tutor] AttributeError: 'list' object has no attribute 'capitalize'

2007-06-20 Thread Norman Khine
Hello, I would like to capitalize each word from an input form. The problem is that the input form can be added as: "HELLO world" "hello world" "HELLO WORLD" etc.. If I do this: >>> string = "HELLO world" >>> print string.capitalize() Hello world >>> only the first word gets capitalized. My

Re: [Tutor] AttributeError: 'list' object has no attribute 'copy'

2006-11-27 Thread Keith Troell
On Nov 27, 2006, at 1:55 PM, Kent Johnson wrote: > Keith Troell wrote: >> I'm a rank beginner. I am running Python 2.3.5 on the Terminal of >> Mac OSX. >> The Tutorial (5.1) mentions list.copy as a list method. When I run > > Are you sure? I don't see it here: > http://www.python.org/doc/2.3.5

Re: [Tutor] AttributeError: 'list' object has no attribute 'copy'

2006-11-27 Thread Kent Johnson
Keith Troell wrote: > I'm a rank beginner. I am running Python 2.3.5 on the Terminal of Mac > OSX. > > The Tutorial (5.1) mentions list.copy as a list method. When I run Are you sure? I don't see it here: http://www.python.org/doc/2.3.5/tut/node7.html#SECTION00710 > > scores =

[Tutor] AttributeError: 'list' object has no attribute 'copy'

2006-11-27 Thread Keith Troell
I'm a rank beginner. I am running Python 2.3.5 on the Terminal of Mac OSX. The Tutorial (5.1) mentions list.copy as a list method. When I run scores = [1, 2, 3] copy = scores.copy () I get: AttributeError: 'list' object has no attribute 'copy' However, I am able to use .copy for dictionaries

Re: [Tutor] AttributeError - ChatServer

2006-01-27 Thread Alan Gauld
> AttributeError: ChatServer instance has no attribute 'decriptors' Read the error carefully - a typo maybe? Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] AttributeError - ChatServer

2006-01-26 Thread John Fouhy
On 27/01/06, Bob Hinkle <[EMAIL PROTECTED]> wrote: > While following a tutorial on how to create a simple chat server I stumbled > upon this problem: > AttributeError: ChatServer instance has no attribute 'decriptors' Hi Bob, Attributes are things like methods or variables that are "attached" to

[Tutor] AttributeError - ChatServer

2006-01-26 Thread Bob Hinkle
While following a tutorial on how to create a simple chat server I stumbled upon this problem: AttributeError: ChatServer instance has no attribute 'decriptors' here is my code: #... import socket import select class

Re: [Tutor] AttributeError: 'str' object has no attribute, 'geturl'

2005-10-11 Thread Joseph Quigley
> You are welcome. This time I would like to help you but the code is > incomplete > (import error for Image) and I have never used urllib2 so I don't really know > what to > do. > Again, try to debug it with pdb. Place "import pdb; pdb.set_trace()" where > you want > the break point and see

Re: [Tutor] AttributeError: 'str' object has no attribute 'geturl'

2005-10-10 Thread Javier Ruere
Joseph Quigley wrote: > Ok, new version (sorry to bug you). > This time I've edited the program so that you can only download todays > (it won't work for any other date). Now I can connect to the server but > it sticks on "Downloading image!" > > Thanks for your prevoius help. > Joe You are w

Re: [Tutor] AttributeError: 'str' object has no attribute 'geturl'

2005-10-09 Thread Joseph Quigley
Ok, new version (sorry to bug you). This time I've edited the program so that you can only download todays (it won't work for any other date). Now I can connect to the server but it sticks on "Downloading image!" Thanks for your prevoius help. Joe #! /usr/bin/env python ###

Re: [Tutor] AttributeError: 'str' object has no attribute 'geturl'

2005-10-09 Thread Joseph Quigley
Javier wrote: > Class Data has a class attribute, 'f', defined as an empty string. Check if > Data.f is initialized before calling getImg. > Also, why initialize with an empty str? Put a None in there or don't define > the attribute at all. > A tip: in line 126 there is a print Data.f. This

Re: [Tutor] AttributeError: 'str' object has no attribute 'geturl'

2005-10-08 Thread Javier Ruere
Joseph Quigley wrote: > Well, I'm back to coding more on my comic downloader and viewer and I > keep getting this error: > > Traceback (most recent call last): > File "F:\Gacor\getgarf.py", line 244, in ? > getImg(Data.todayStrip) > File "F:\Gacor\getgarf.py", line 127, in getImg > Da

[Tutor] AttributeError: 'str' object has no attribute 'geturl'

2005-10-08 Thread Joseph Quigley
Well, I'm back to coding more on my comic downloader and viewer and I keep getting this error: Traceback (most recent call last):   File "F:\Gacor\getgarf.py", line 244, in ?     getImg(Data.todayStrip)   File "F:\Gacor\getgarf.py", line 127, in getImg     Data.f.geturl() AttributeError: 'str' obj

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-16 Thread Juan Shen
Juan Shen wrote: Marc Gartler wrote: Hi everybody, Prior to this chunk of code 'glass' has been chosen from a list of colors via user input, and I now want to have that choice connect to one of several possible classes: def glass_type(glasstype): if glasstype == 'Red': myglass = RedG

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-16 Thread Juan Shen
Marc Gartler wrote: Hi everybody, Prior to this chunk of code 'glass' has been chosen from a list of colors via user input, and I now want to have that choice connect to one of several possible classes: def glass_type(glasstype): if glasstype == 'Red': myglass = RedGlassCost() el

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Marc Gartler
That did it. Thanks, Max. On Wednesday, December 15, 2004, at 09:28 PM, Max Noel wrote: On Dec 16, 2004, at 04:20, Max Noel wrote: def glass_type(glasstype): if glasstype == 'Red': myglass = RedGlassCost() elif glasstype == 'Blue': myglass = BlueGla

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Marc Gartler
# --superclass-- class FrameCost: def __init__(self): self.width = int(0) self.length = int(0) # Calculate cost per square foot def Cost_per_sqft(self, cost): return (((self.width) * (self.length) / 144.00) * (cost)) # Calculate cost per linear foot def Cost_per_ft(self, cost): r

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Max Noel
On Dec 16, 2004, at 04:20, Max Noel wrote: def glass_type(glasstype): if glasstype == 'Red': myglass = RedGlassCost() elif glasstype == 'Blue': myglass = BlueGlassCost() elif glasstype == 'Yellow': myglass = YellowGlassCost()

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Max Noel
On Dec 16, 2004, at 03:56, Marc Gartler wrote: Hi everybody, Prior to this chunk of code 'glass' has been chosen from a list of colors via user input, and I now want to have that choice connect to one of several possible classes: def glass_type(glasstype): if glasstype == 'Red':

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Terry Carroll
On Wed, 15 Dec 2004, Marc Gartler wrote: > Hi everybody, > > Prior to this chunk of code 'glass' has been chosen from a list of > colors via user input, and I now want to have that choice connect to > one of several possible classes: > > def glass_type(glasstype): > if glasstype == 'Red'

[Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Marc Gartler
Hi everybody, Prior to this chunk of code 'glass' has been chosen from a list of colors via user input, and I now want to have that choice connect to one of several possible classes: def glass_type(glasstype): if glasstype == 'Red': myglass = RedGlassCost() elif g