Re: [Tutor] Question about calling functions

2007-08-26 Thread Alan Gauld
"Ara Kooser" <[EMAIL PROTECTED]> wrote > a character works except for one part. You have a choice of > excepting > a set of numbers. If you choose n then the program dumps you into: > def navy() instead of going back to def upp(). > > print upp() > print """You have a chance to reroll if needed."

Re: [Tutor] sorting lists in dictionary values

2007-08-26 Thread Terry Carroll
On Sun, 26 Aug 2007, Eric Abrahamsen wrote: > I wrote the stupid little script below for practice; it takes a text > file with a list of surnames, and returns a dictionary where the keys > are first letters of the names, and the values are lists of names > grouped under their appropriate fir

[Tutor] Question about calling functions

2007-08-26 Thread Ara Kooser
Hello, After taking some suggestions from bhaaluu my program for generating a character works except for one part. You have a choice of excepting a set of numbers. If you choose n then the program dumps you into: def navy() instead of going back to def upp(). I am guessing this has to do with h

Re: [Tutor] How to put an event into the Tcl/Tk event queue?

2007-08-26 Thread Alan Gauld
"Daniel Knierim" <[EMAIL PROTECTED]> wrote > I'd like to simulate user input to TkInter applications from > another Python script, by inserting events in the Tcl event queue. There are two scenarios where I'd expect that to be needed: 1) To roboticise an existing app, particularly if you don;t ha

Re: [Tutor] client server apps

2007-08-26 Thread Alan Gauld
"Noufal Ibrahim" <[EMAIL PROTECTED]> wrote >> What's the point in having a server app between the user frontend >> and >> a database backend? > Off the cuff, I think the layer would decouple your store (the db) > and > the UI. That's part of it but not the main reason. N-Teir was being touted

Re: [Tutor] sorting lists in dictionary values

2007-08-26 Thread Eric Abrahamsen
Whoa, this made my brain hurt. And I thought I was being clever using a set... I can't say I really understand this yet, but I'm trying. If anyone's following along at home I found this link kind of helpful: http://python.net/crew/mwh/hacks/setdefault.html Thanks a lot for your help, Eric

Re: [Tutor] client server apps

2007-08-26 Thread Noufal Ibrahim
[EMAIL PROTECTED] wrote: > Hi! > > > What's the point in having a server app between the user frontend and > a database backend? (As is the case of TinyERP wich is writen in > python-GTK) > > Can't simillar functionality be achieved without that server? What are > the main pro's and con's?

Re: [Tutor] sorting lists in dictionary values

2007-08-26 Thread Ricardo Aráoz
Eric Abrahamsen wrote: > I wrote the stupid little script below for practice; it takes a text > file with a list of surnames, and returns a dictionary where the keys > are first letters of the names, and the values are lists of names > grouped under their appropriate first-letter key, like so: > >

[Tutor] client server apps

2007-08-26 Thread paulino1
Hi! What's the point in having a server app between the user frontend and a database backend? (As is the case of TinyERP wich is writen in python-GTK) Can't simillar functionality be achieved without that server? What are the main pro's and con's? Thank you! Paulino

[Tutor] How to put an event into the Tcl/Tk event queue?

2007-08-26 Thread Daniel Knierim
Hi All, I'm starting to learn how to use the TkInter module. So far I've got a couple versions of 'hello world' working. I'd like to simulate user input to TkInter applications from another Python script, by inserting events in the Tcl event queue. Tcl/Tk has a couple functions for this (Tk_

Re: [Tutor] sorting lists in dictionary values

2007-08-26 Thread Eric Abrahamsen
> From noob to noob : sort sorts in place. I seem to remember it > returns nothing. > > This works: > > In [12]: directoryOut[12]: > {'A': ['Abercrombie', 'Aalberg'], > 'B': ['Barnaby', 'Black', 'Biggles'], > 'D': ['Douglas', 'Dawn', 'Diggle'], > 'G': ['Granger', 'Gossen']} > > In [13]: for key i

[Tutor] sorting lists in dictionary values

2007-08-26 Thread Eric Abrahamsen
I wrote the stupid little script below for practice; it takes a text file with a list of surnames, and returns a dictionary where the keys are first letters of the names, and the values are lists of names grouped under their appropriate first-letter key, like so: {'A': ['Abercrombie'], 'B':