Re: [Tutor] stack class

2008-07-11 Thread Reed O'Brien
On Jul 11, 2008, at 7:54 PM, Christopher Spears wrote: For another Core Python Programming question, I created a stack class. I then put the class into a script to test it: I understand that this is an exercise; but I think it might be interesting for you to also look at collections.deque

[Tutor] Launching default web browsers.

2008-07-11 Thread ammar azif
Hi, I am going to develop an application that will launch the user's computer default web browser pointing to a URL. How to do this in python and which library should I use? Also, my development platform is Linux but the application is targeted to run in Windows platform. Is there any major pla

Re: [Tutor] stack class

2008-07-11 Thread Alan Gauld
"Christopher Spears" <[EMAIL PROTECTED]> wrote I created a stack class. I then put the class into a script to test it: I'll assume the crazy indentation is due to email errors. class Stack(list): def isempty(self): length = len(self) if length == 0: return True else:

[Tutor] stack class

2008-07-11 Thread Christopher Spears
For another Core Python Programming question, I created a stack class. I then put the class into a script to test it: #!/usr/bin/python class Stack(list): def isempty(self): length = len(self) if length == 0: return True else: return False

Re: [Tutor] Classes

2008-07-11 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote 1. What is the difference between a classmethod and a staticmethod, and when would i use either? Kent pointed you at the recent discussion but from your later comments I thibnk its pretty safe to say that for now you don't need to care. The vast majority of classes yo

Re: [Tutor] how can I use the functions inside ITfInputProcessorProfiles

2008-07-11 Thread Tim Golden
Dror Cohen wrote: I'm trying to use the these functions which are in isnide of ITfInputProcessorProfiles http://msdn.microsoft.com/en-us/library/ms538984(VS.85).aspx I think that its registry key is {892F230F-FE00-4A41-A98E-FCD6DE0D35EF} (though I don't know if I even need this) How can I us

Re: [Tutor] Classes

2008-07-11 Thread Kent Johnson
On Fri, Jul 11, 2008 at 4:58 AM, <[EMAIL PROTECTED]> wrote: > 1. What is the difference between a classmethod and a staticmethod, and when > would i use either? We discussed this recently: http://thread.gmane.org/gmane.comp.python.tutor/47054/focus=47108 Kent

Re: [Tutor] Dynamic Method Creation

2008-07-11 Thread Kent Johnson
On Thu, Jul 10, 2008 at 1:38 PM, Chris Fuller <[EMAIL PROTECTED]> wrote: > You can also use new.classobj() to create arbitrary classes on-the-fly. See > the documentation for the new module, and google "python metaclasses" FWIW new.classobj() will create an old-style class. You can create a new

[Tutor] Classes

2008-07-11 Thread paul
hi,I have two questions please:1. What is the difference between a classmethod and a staticmethod, and when would i use either?2. I want to create an object, presumably a class, to handle attributes of an open gl object.For example, if i wanted to create a 2d square i need 4 points, each with an x,

[Tutor] how can I use the functions inside ITfInputProcessorProfiles

2008-07-11 Thread Dror Cohen
Hi everybody, I'm trying to use the these functions which are in isnide of ITfInputProcessorProfiles http://msdn.microsoft.com/en-us/library/ms538984(VS.85).aspx I think that its registry key is {892F230F-FE00-4A41-A98E-FCD6DE0D35EF} (though I don't know if I even need this) How can I use its fu