Re: [Tutor] where does the ViewerFrameWorkGUI come from

2011-12-18 Thread Steven D'Aprano
lina wrote: Hi, I met below issue: File /usr/lib/python2.7/dist-packages/ViewerFramework/VF.py, line 369, in __init__ self.GUI = ViewerFrameworkGUI(self, title=title, NameError: global name 'ViewerFrameworkGUI' is not defined Is VF.py your code? If so, you have a bug in the code. If

[Tutor] Memory and functions

2011-12-18 Thread Charles Becker
I have a rather obscure question, and not sure where in the docs to find an answer like this. For functions that return values (ie the list method pop): If you don't assign the returned value to anything does it still end up residing in memory? Just seems like this could be a potential

Re: [Tutor] Memory and functions

2011-12-18 Thread Steven D'Aprano
Charles Becker wrote: I have a rather obscure question, and not sure where in the docs to find an answer like this. For functions that return values (ie the list method pop): If you don't assign the returned value to anything does it still end up residing in memory? Just seems like this

Re: [Tutor] Memory and functions

2011-12-18 Thread Peter Otten
Charles Becker wrote: For functions that return values (ie the list method pop): If you don't assign the returned value to anything does it still end up residing in memory? Just seems like this could be a potential problem to watch out for when memory usage is an issue (probably not most of

Re: [Tutor] where does the ViewerFrameWorkGUI come from

2011-12-18 Thread Walter Prins
Lina, On 18 December 2011 05:08, lina lina.lastn...@gmail.com wrote: Hi, I met below issue: File /usr/lib/python2.7/dist-packages/ViewerFramework/VF.py, line 369, in __init__    self.GUI = ViewerFrameworkGUI(self, title=title, NameError: global name 'ViewerFrameworkGUI' is not defined

[Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Russell Shackleton
I am learning Python classes by writing an adventure game. I have extracted just the relevant code. The player can look, go, drop, take, inventory but not examine. Python produces the error message in the Player class, examine function, in the first print statement. How do I fix this code,

Re: [Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Wayne Werner
On Sun, Dec 18, 2011 at 4:06 PM, Russell Shackleton rsh...@xtra.co.nzwrote: I am learning Python classes by writing an adventure game. I have extracted just the relevant code. The player can look, go, drop, take, inventory but not examine. Python produces the error message in the Player

Re: [Tutor] unsupported operand

2011-12-18 Thread stm atoc
Well, I tried to check and I do not have that problem any more..but i have the clear script as follows and a couple of question regarding to this: # coding: utf-8 from pylab import * import numpy import matplotlib.pyplot as pyplot import matplotlib.mlab as mlab #tmax=360 with

Re: [Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Hugo Arts
On Sun, Dec 18, 2011 at 11:23 PM, Wayne Werner waynejwer...@gmail.com wrote: On Sun, Dec 18, 2011 at 4:06 PM, Russell Shackleton rsh...@xtra.co.nz wrote: I am learning Python classes by writing an adventure game. I have extracted just the relevant code. The player can look, go, drop, take,

[Tutor] PYTHONPATH (Mac OS X)

2011-12-18 Thread Stayvoid
Hey there! How to set it right? Cheers! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Russell Shackleton
I am learning Python classes by writing an adventure game. I have extracted just the relevant code. The player can look, go, drop, take, inventory but not examine. Python produces the error message in the Player class, examine function, in the first print statement. I have added the traceback

Re: [Tutor] sqlite3: turning on foreign key support thru python

2011-12-18 Thread Wayne Werner
On Fri, Dec 16, 2011 at 1:43 PM, Modulok modu...@gmail.com wrote: How do I tell if it succeeded (short of trying an operation that should be blocked by foreign keys)? How do I use that cursor object returned by the pragma query to tell if its a '1' (on) or a '0' (off) and verify the

Re: [Tutor] reset password program

2011-12-18 Thread Wayne Werner
On Fri, Dec 16, 2011 at 7:17 PM, Robert Sjoblom robert.sjob...@gmail.comwrote: Some improvements to think about, in order of least secure (easiest) to most secure (hardest). (1) my secret password.txt is a crappy name. Is there a better name? I'm going to go with EULA.txt; the reasons

Re: [Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Wayne Werner
On Sun, Dec 18, 2011 at 4:49 PM, Russell Shackleton rsh...@xtra.co.nzwrote: I am learning Python classes by writing an adventure game. I have extracted just the relevant code. The player can look, go, drop, take, inventory but not examine. Python produces the error message in the Player

Re: [Tutor] unsupported operand

2011-12-18 Thread Alan Gauld
On 18/12/11 22:35, stm atoc wrote: Well, I tried to check and I do not have that problem any more..but i have the clear script as follows and a couple of question regarding to this: # coding: utf-8 from pylab import * import numpy import matplotlib.pyplot as pyplot import matplotlib.mlab as

Re: [Tutor] 'str' object has no attribute 'description'

2011-12-18 Thread Alan Gauld
On 18/12/11 22:06, Russell Shackleton wrote: I have extracted just the relevant code. Its possible you extracted too much but class Player(object): The player in the game. def __init__(self, name, currentRoom=None): def take(self, item): Take (pick up) an item

Re: [Tutor] PYTHONPATH (Mac OS X)

2011-12-18 Thread bob gailer
On 12/18/2011 5:45 PM, Stayvoid wrote: Hey there! How to set it right? You may not get an answer as your question is pretty vague. Please clarify, or expand, or tell us what problem you are having or trying to solve. -- Bob Gailer 919-636-4239 Chapel Hill NC

Re: [Tutor] where does the ViewerFrameWorkGUI come from

2011-12-18 Thread lina
On Mon, Dec 19, 2011 at 4:28 AM, Walter Prins wpr...@gmail.com wrote: Lina, Hi Walter, I am sorry, before I posted I did not realize people would get much attention to do all following as you did. Thanks, Well, yesterday I posted a bug report and later during my waiting, based on it's also