Re: [Tutor] capwords, maketrans

2007-06-13 Thread Stephen McInerney
Ok thanks all. The doucmentation is confusing on that point. Also when it refers to the methods becoming methods of string objects a link would be nice. Regards, Stephen >From: "John Fouhy" <[EMAIL PROTECTED]> >To: "Jacob S." <[EMAIL PROTECTED]> >CC: tutor@python.org >Subject: Re: [Tutor] capw

[Tutor] Componentone - TrueDBGrid Control

2007-06-13 Thread Pradeep Kumar
Hi, Is wxPython have Componentone Trudbgrid like control. If yes, Please inform. if No, how we can made one. Pradeep ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] capwords, maketrans

2007-06-13 Thread John Fouhy
On 14/06/07, Jacob S. <[EMAIL PROTECTED]> wrote: > Hi guys. > I was just wondering what's going to happen to capwords and maketrans > when the string module is finally terminated. As far as I know, the string module as a whole is not going away. In particular, the string module supplies vario

[Tutor] capwords, maketrans

2007-06-13 Thread Jacob S.
Hi guys. I was just wondering what's going to happen to capwords and maketrans when the string module is finally terminated. Is python just not going to support those to functions anymore? Or are they going to suddenly be implemented as string methods at the last minute? Or are they on the list

Re: [Tutor] Table of replacements for deprecated fns from 'string' module?

2007-06-13 Thread John Fouhy
On 14/06/07, Stephen McInerney <[EMAIL PROTECTED]> wrote: > Where is there a table of replacements for the deprecated 'string' fns > esp. the basic common ones e.g. string.split(), join(), replace(), find(), > index() ? > http://docs.python.org/lib/node42.html They've basically all moved into the

[Tutor] Table of replacements for deprecated fns from 'string' module?

2007-06-13 Thread Stephen McInerney
Hi, Where is there a table of replacements for the deprecated 'string' fns esp. the basic common ones e.g. string.split(), join(), replace(), find(), index() ? http://docs.python.org/lib/node42.html Are we supposed to use 're' fns even for very simple operations? that seems like way overkill. Th

Re: [Tutor] wxPython GUI builders?

2007-06-13 Thread Dick Moores
At 01:08 PM 6/13/2007, Alan Gauld wrote: >What's available and in what state of readiness? I don't have the details you want, but you might look at SPE. Dick Moores ___ Tutor maillist - Tutor@python.org http://mail.

Re: [Tutor] wxPython GUI builders?

2007-06-13 Thread Carlos Daniel Ruvalcaba Valenzuela
wxGlade is a good GUI builder, very much like Glade, however it may o may not integrate with your coding style but you should definitively give it a try. PythonCard is a nice concept I personally do something similar but with XML, parse and build the GUI from it, then tweak the layout manually, wi

[Tutor] wxPython GUI builders?

2007-06-13 Thread Alan Gauld
What's available and in what state of readiness? I tried Boa Constructor but after half a dozen code tweaks I was still running into compatibility errors with the latest wxPython and gave up. I know that Glade is out there, but what state is it in? And PythonCard offers another approach but I

Re: [Tutor] Get max quantity

2007-06-13 Thread Brian Wisti
Hi Carlos, On 6/13/07, Carlos <[EMAIL PROTECTED]> wrote: > Hello, > > If I have a dictionary like: > > inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217} > > How can I get the item with the largest quantity? I tried: > > max(inventory) > > but got: > > 'pears' > > What I wou

Re: [Tutor] Get max quantity

2007-06-13 Thread Jason Massey
More than one way to skin a cat: import operator sort_key = operator.itemgetter(1) sorted(inventory.items(),key=sort_key)[-1] ('oranges',525) or... inventory.items() [('pears', 217), ('apples', 430), ('oranges', 525), ('bananas', 312)] count_first = [(count,fruit) for fruit,count in invent

Re: [Tutor] Get max quantity

2007-06-13 Thread Kent Johnson
Carlos wrote: > Hello, > > If I have a dictionary like: > > inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217} > > How can I get the item with the largest quantity? I tried: > > max(inventory) > > but got: > > 'pears' > > What I would like to get is 'oranges', at least

[Tutor] Get max quantity

2007-06-13 Thread Carlos
Hello, If I have a dictionary like: inventory = {'apples': 430, 'bananas': 312, 'oranges': 525, 'pears': 217} How can I get the item with the largest quantity? I tried: max(inventory) but got: 'pears' What I would like to get is 'oranges', at least in this case. Thanks, Carlos

Re: [Tutor] locking files

2007-06-13 Thread Alan Gauld
"Jeff Peery" <[EMAIL PROTECTED]> wrote > does anyone know if there is a way in python to lock > a file so others cannot open it, or can only read it? Thats normally controlled by your OS and the rules vary slightly between them. In general if you open a file for writing the OS should lock it

[Tutor] using zip

2007-06-13 Thread lucio arteaga
I am trying to learn using zip in combination of if statemeny. , If I do not make mistakes the program runs wll. Otherwise very bad? Can any one help Best wishes Lucio___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] using zip

2007-06-13 Thread lucio arteaga
I am trying to learn using zip in combination with if statements. , If I do not make mistakes the program runs wlel. Otherwise very bad? Can anyone help Best wishes Lucio___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tuto

[Tutor] locking files

2007-06-13 Thread Jeff Peery
does anyone know if there is a way in python to lock a file so others cannot open it, or can only read it? I have a program that read/writes to a file and I would like to lock others out of it while I'm operating on it. thanks. Jeff - We won't tell.

Re: [Tutor] cannot pickle instancemethod objects

2007-06-13 Thread Kent Johnson
hok kakada wrote: >> What kind of object is matcher? Does it have any attributes that are >> functions? (Not methods you defined for the class, but functions or >> methods that you assign to attributes of self.) > Actually, I use the translate-toolkit from > http://translate.sourceforge.net/snap