Re: [Tutor] Python on network problems

2006-08-13 Thread Diana Hawksworth
Thanks Tom. I installed the latest version on Friday - but today the system went down again. I am inclined to think it is not a Python problem at all. Just need someone who also has it installed on a network to know if they have had any problems!! Diana - Original Message - From: "Tom

[Tutor] Having trouble getting mind around decimal module

2006-08-13 Thread Dick Moores
I'm having trouble getting my mind around the decimal module. From the tutorial () I can see how to get 1/7 to, say, 32 places: >>> from decimal import Decimal >>> getcontext().prec = 32 >>> Decimal(1) / Decimal(7) Decimal("0.14285714285714285

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread anil maran
i m sure the users need to maintain their own data, but as a provider we need to store their information right, sessions and cookies work only during their stay in the site, after they exit, im sure they would like to come back to the same info, wont u so i was wondering what is the best way to ma

Re: [Tutor] Python on network problems

2006-08-13 Thread Luke Paireepinart
Diana Hawksworth wrote: > Dear List, > > I have Python installed on 1 of 4 labs at my High School. The lab is > connected to a whole school network. Students login through the network - > but Python is active in this lab only. > You have 4 labs. Python is installed on all the computers in a s

Re: [Tutor] Global variables

2006-08-13 Thread Luke Paireepinart
Kermit Rose wrote: > > > From: Danny Yoo > Date: 08/09/06 16:23:35 > To: Kermit Rose > Cc: tutor@python.org > > > If I can figure out how to make my main function subroutine declare global > variables > then I won't need to pass parameters most parameters to the other > subroutines, >

[Tutor] Python on network problems

2006-08-13 Thread Diana Hawksworth
Dear List, I have Python installed on 1 of 4 labs at my High School. The lab is connected to a whole school network. Students login through the network - but Python is active in this lab only. Sometimes I have a student who simply cannot access Python, even though he has been working on it f

[Tutor] Global variables

2006-08-13 Thread Kermit Rose
From: Danny Yoo Date: 08/09/06 16:23:35 To: Kermit Rose Cc: tutor@python.org If I can figure out how to make my main function subroutine declare global variables then I won't need to pass parameters most parameters to the other subroutines, and will bypass the problem I'm having that

Re: [Tutor] self (again)

2006-08-13 Thread Alan Gauld
> I think it works as follows. I just need to know what is right. > > Class variables are 'global' for the class and all instances of the > class. Correct. Classes are containers and they contain the class variables and method definitions shared by all instances of the class (and its subclasses).

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread Alan Gauld
Caveat - I know nothing about RSS, it's one of those web technologies that I just can't get excited about, sorry... However... > there is a blog > and it associated feed entries > the blog posts > when someone clicks it i need to maintain read status for it > and when it is unclicked i need the

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread Danny Yoo
On Sun, 13 Aug 2006, anil maran wrote: > when someone clicks it i need to maintain read status for it Hi Anil, You've giving some "use case" information, which is useful. Can you also give us some definitions? Are you saying that an rss entry is some data with an associated 'read' status?

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread anil maran
there is a blogand it associated feed entriesthe blog postswhen someone clicks it i need to maintain read status for itand when it is unclicked i need the unread statusthis needs to be maintianed for a huge number of usrsthanksBob Gailer <[EMAIL PROTECTED]> wrote: anil maran wrote:>> suggestions f

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread Daniel McQuay
i concur, anil try looking at how you ask a question.http://catb.org/~esr/faqs/smart-questions.html#beforeOn 8/13/06, Bob Gailer <[EMAIL PROTECTED]> wrote: anil maran wrote:>>   suggestions for read unread items datastructure>>> keep a list of read and unread items>> hi guys> i m building an r

Re: [Tutor] suggestions for read unread items datastructure

2006-08-13 Thread Bob Gailer
anil maran wrote: > > suggestions for read unread items datastructure > > > keep a list of read and unread items > > hi guys > i m building an rss reader and i want you suggestions for datastructure > for keeping read and unread list for each use > i m assuming it will be very sparse Just a g

Re: [Tutor] Style query

2006-08-13 Thread dave s
On Sunday 13 August 2006 12:02, you wrote: > I believe you can find it here: > > http://www.python.org/doc/essays/styleguide.html > > Authored by Guido Van Rossum himself. > Thanks :) Dave > > Cheers, > > Richard > > On 8/13/06, dave s <[EMAIL PROTECTED]> wrote: > > As my programs become more c

Re: [Tutor] Style query

2006-08-13 Thread Richard Querin
I believe you can find it here:http://www.python.org/doc/essays/styleguide.htmlAuthored by Guido Van Rossum himself.Cheers, RichardOn 8/13/06, dave s <[EMAIL PROTECTED]> wrote: As my programs become more complex I am aware of the need to adopt aconsistent style. To differentiate between classes, i

[Tutor] Style query

2006-08-13 Thread dave s
As my programs become more complex I am aware of the need to adopt a consistent style. To differentiate between classes, instances & objects I use capital letters for example: A class uses 'MyClass' A class instance 'myInstance' A def uses 'myDef' An object 'myobject' or 'my_object' etc Can an

Re: [Tutor] [pygtk] key_press_event

2006-08-13 Thread John CORRY
Sandro, That's exactly what I need. Thanks, John. > def callback3(self,data,widget): > > input = data.get_text() > print input > data.set_text("test") If you don't return True, default callback will be called that insert the 'a'. I have something like t

Re: [Tutor] How to teach Python

2006-08-13 Thread wesley chun
hi elaine, welcome to Tutor. this list is really for those learning Python and/or programming, so i'm going to assume that your question is directed to mainly tutors, but perhaps tutees in reference to their experience in learning Python and how it was/is taught to them. if you want to address t

[Tutor] key_press_event

2006-08-13 Thread John CORRY
Hi, I'm using Python 2.4, pygtk and Glade2. I have a few text entries. I am trying to put validation on the text entry boxes. I am trying to catch the key_press_event, check the key that has been pressed and either allow it or put back the old text. The code is below with the output after it.

[Tutor] self (again)

2006-08-13 Thread John Aherne
I have been following the thread on self because for the past month I have been driven potty trying to be sure that I understand the ramifications of how self works. I have tried to create some code that tries to prove how self, variables, assignment and namespace gel together. I can't convince

Re: [Tutor] How to teach Python

2006-08-13 Thread Alan Gauld
Hi Elaine, There is a separate mailing list for people who teach Python as opposed to people learning Python. They might have a more pertinent view on this. However, for what its worth here are my views... > students who already know one programming language. The language they know might make

[Tutor] suggestions for read unread items datastructure

2006-08-13 Thread anil maran
suggestions for read unread items datastructurekeep a list of read and unread itemshi guysi m building an rss reader and i want you suggestions for datastructurefor keeping read and unread list for each usei m assuming it will be very sparsethanks __