Listing subtypes

2007-11-28 Thread Samuel
Hi, I remember seeing an easy way to list all subtypes of a specific type but I haven't been able to find it anymore. What I am trying to do is this: Given a class, get a list of all classes that derive from it. Pretty much like __mro__ but downwards rather then upwards. Any ideas? -Samuel -- ht

Re: Listing subtypes

2007-11-28 Thread Ben Finney
Samuel <[EMAIL PROTECTED]> writes: > I remember seeing an easy way to list all subtypes of a specific type > but I haven't been able to find it anymore. What I am trying to do is > this: Given a class, get a list of all classes that derive from it. > Pretty much like __mro__ but downwards rather t

Very basic, sorting a list ???

2007-11-28 Thread stef mientki
hello, I'm trying to sort a list, using the same list at the commandline works, but in a program it doesn't. Here is the code print 'xx1',type(ordered_list) print 'xx2',ordered_list print 'xx3',ordered_list.sort() And this is the result xx1 xx2 [14, 12, 10] xx3 None What am I doing

Re: Very basic, sorting a list ???

2007-11-28 Thread Ben Finney
stef mientki <[EMAIL PROTECTED]> writes: > Here is the code >print 'xx1',type(ordered_list) >print 'xx2',ordered_list >print 'xx3',ordered_list.sort() > > And this is the result > xx1 > xx2 [14, 12, 10] > xx3 None > > What am I doing wrong ? Apparently, ignoring the documentation o

Re: Very basic, sorting a list ???

2007-11-28 Thread Peter Decker
On Nov 28, 2007 7:22 PM, stef mientki <[EMAIL PROTECTED]> wrote: > print 'xx3',ordered_list.sort() The sort() method returns None. It sorts the list in place; it doesn't return a copy of the sorted list. -- # p.d. -- http://mail.python.org/mailman/listinfo/python-list

Re: Listing subtypes

2007-11-28 Thread Diez B. Roggisch
Ben Finney schrieb: > Samuel <[EMAIL PROTECTED]> writes: > >> I remember seeing an easy way to list all subtypes of a specific type >> but I haven't been able to find it anymore. What I am trying to do is >> this: Given a class, get a list of all classes that derive from it. >> Pretty much like __

Re: Listing subtypes

2007-11-28 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > A class knows its parents; it doesn't know its children. (Or, in > > other words, children need to know who their parents are, but > > aren't required to notify their parents about anything.) > > Not right. These special chi

MySQLdb autocommit and SELECT problems

2007-11-28 Thread Jesse Lehrman
I'm experiencing strange behavior using MySQLdb. If I turn off autocommit for my connection, I get stale data when I perform multiple and identical SELECT's. If autocommit is enabled, I follow my SELECT statement with a COMMIT statement or I create a new connection I don't get this behavior. E

Tkinter, wxPython, PyGtk, or PyQt...

2007-11-28 Thread John Jameson
hi carl, I'm totally new with graphics for python. I'm using windows, but you make it sound like I need to know how to program with MFC to use them? Is this true? Can't you just stay in python? best, John I would like like to start doing some GUI-programming in Python, but don't know which lib

Re: Very basic, sorting a list ???

2007-11-28 Thread i3dmaster
On Nov 28, 4:22 pm, stef mientki <[EMAIL PROTECTED]> wrote: > hello, > > I'm trying to sort a list, using the same list at the commandline works, > but in a program it doesn't. > > Here is the code > print 'xx1',type(ordered_list) > print 'xx2',ordered_list > print 'xx3',ordered_list.so

Any Pythonista knowing Estonian on this list?

2007-11-28 Thread André
Some of the tasks that are part of Google's H.O.P. involved translation (i18n) of some well-known ... and some lesser known projects. I have received a translation in Estonian for Crunchy - probably of the order of a 100 phrases. I just want to make sure that no practical joke has been played in

Re: How to Teach Python "Variables"

2007-11-28 Thread MonkeeSage
On Nov 28, 8:35 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Nov 27, 5:31 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > Of course. But then it really depends on the teaching methodology, > > doesn't it? There is no reason (well, barring the restraints of the > > curriculum vitea), that one s

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-28 Thread Benjamin
John Jameson wrote: > hi carl, > > I'm totally new with graphics for python. I'm using windows, but you > make it sound like I need to know how to program with MFC to use them? > Is this true? Can't you just stay in python? Yes, all of the libraries below let you stay in Python. (They have binary

Bundling Python on Mac

2007-11-28 Thread Benjamin
Hello, I'm writing a Python/PyQt application. For my Mac distribution. I would like to include all the needed libraries in the Mac bundle. How should I go about doing this? -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Frame/Dialog with Tabs

2007-11-28 Thread tarun
Hello, Can anyone help with a *sample wxpython code* that can create a frame/dailog with tabs. Something similar in the attachment. Thanks & Regards, Tarun <>-- http://mail.python.org/mailman/listinfo/python-list

Re: Compile Cheetah Template on Windows

2007-11-28 Thread brianrpsgt1
Tim, thank you very much for the reply. The 'cheetah' function is now working! I am still having a problem creating the file. I continually get errors. I am sure that it is something very simple. Below is the code, please guide me in the right direction :: import psycopg2, psycopg2.extens

tip of the day generator

2007-11-28 Thread Joseph king
thanks for all the help... -- http://mail.python.org/mailman/listinfo/python-list

How to access nested structural members from python

2007-11-28 Thread abarun22
Hi I would like to know if there are any ways to access the members of a nested structure inside python. I use SWIG as interface for C. My structure comes as follows. struct SA{ int nb_dep, max_dep SB *b } struct SB{ int id[10], node, kg; double dep[3]; } I have written a C helper function like t

Re: Listing subtypes

2007-11-28 Thread Paddy
On Nov 29, 1:09 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > > Ben Finney schrieb: > > > A class knows its parents; it doesn't know its children. (Or, in > > > other words, children need to know who their parents are, but > > > aren't required to no

Re: Listing subtypes

2007-11-28 Thread Samuel
On Nov 29, 1:54 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > print A.__subclasses__() Ah, I knew I had seen this before. Thanks! -Samuel -- http://mail.python.org/mailman/listinfo/python-list

<    1   2