[Tutor] lists and recursion

2006-07-21 Thread Christopher Spears
I am working out of How To Think Like A Computer Scientist. Here is the code for a module called node.py: def printList(node): nodeList = [] while node: nodeList.append(node.cargo) node = node.next pri

[Tutor] Good teamwork!

2006-07-21 Thread John CORRY
George/Kent,   Thanks guys for the pointers.   Kent – The gtk-entry-set-alignment() works a treat.   George – I like the look of the sample code you posted.  At the moment it doesn’t give me exactly what I need but I am still playing with it.  There may be another question on this lat

Re: [Tutor] Calling a function by string name

2006-07-21 Thread Smith, Jeff
Title: Message Fantastic...that really did the trick!  I actually made one modification since p4python allows you to run Perforce commands by calling them with obj.run_COMMAND(args) so the final solution was:       def _p4run(self, method, *args):    'runs a Perforce command'    try

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread Orri Ganel
As a follow up to my last email, I think the issue is more that the display doesn't update before the command associated with the "search" button has finished processing, so any attempts to get data about the display from within the method are fruitless since the display hasn't changed yet. I

Re: [Tutor] Calling a function by string name

2006-07-21 Thread Michael P. Reilly
On 7/21/06, Smith, Jeff <[EMAIL PROTECTED]> wrote: I have an object and I want to call a method that I have constructed the name for in a string.   For example: str_method = 'myfun' obj.str_method   Of course, this fails.  I know I could probably do this with exec but is there a better

Re: [Tutor] Calling a function by string name

2006-07-21 Thread Kent Johnson
Smith, Jeff wrote: > I have an object and I want to call a method that I have constructed > the name for in a string. > > For example: > str_method = 'myfun' > obj.str_method > > Of course, this fails. I know I could probably do this with exec but > is there a better way? Use getattr(): get

[Tutor] Calling a function by string name

2006-07-21 Thread Smith, Jeff
Title: Message I have an object and I want to call a method that I have constructed the name for in a string.   For example: str_method = 'myfun' obj.str_method   Of course, this fails.  I know I could probably do this with exec but is there a better way?   For context, the specific appli

[Tutor] Using python to create and save a Ms Word file

2006-07-21 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Everyone, I wasn't entirely satisfied with the Ms Word solution because it requires the program run on Windows and have Office installed. As an alternate solution, I created the program listed below to read a file and create a RTF file format doc

Re: [Tutor] Binding ListBox

2006-07-21 Thread Danny Yoo
> I am learning Python 2.4 with Tkinter. I have a series of radio buttons > that I want to bind to their own individual listbox in order to narrow > down a selection process. Hi Joe, Ok, are you familiar with callbacks? According to: http://www.pythonware.com/library/tkinter/introduction/x6

Re: [Tutor] Using python to create and save a Ms Word file

2006-07-21 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for your help on this. Here is the completed code in case anyone is interested. #! C:\Python24\python # # program: mswword.py # Author: Andrew Robert # # Ver Date ProgrammerModification # 1.0 07/20/06 AAR

[Tutor] Binding ListBox

2006-07-21 Thread Joe Cox
I am learning Python 2.4 with Tkinter. I have a series of radio buttons that I want to bind to their own individual listbox in order to narrow down a selection process. I just don't seem to grasp how to call up the approiate box to it's proper radiobutton. Please help. Joe Cox 513-293-4830 mobi

[Tutor] [OT] Python proficiency test

2006-07-21 Thread Kent Johnson
I recently helped create an on-line Python proficiency test. The publishers of the test are looking for beta testers to try the test and give feedback. If you are interested, here is an announcement from the publisher: > Brainbench is currently beta testing a new series of test questions for > o

Re: [Tutor] Help me make it look pretty!

2006-07-21 Thread Kent Johnson
John CORRY wrote: > > Good evening all. > > > > I am writing a program using python 2.4, glade 2 and pygtk. It takes > input from the user using textentry boxes. The input should be a > number. When the user keys the data in, it automatically left > justifies. The function below, takes the

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread Michael Lange
On Fri, 21 Jul 2006 03:02:30 -0400 Orri Ganel <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm working on the GUI for my extended iTunes search, which allows > searches far beyond the native iTunes capability. Once the search has > been completed, a window contining a Tix.CheckList with the res

Re: [Tutor] Help me make it look pretty!

2006-07-21 Thread Michael Lange
On Thu, 20 Jul 2006 20:16:58 +0100 "John CORRY" <[EMAIL PROTECTED]> wrote: > Good evening all. > > I am writing a program using python 2.4, glade 2 and pygtk. It takes > input from the user using textentry boxes. The input should be a > number. When the user keys the data in, it automatically

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread John Fouhy
On 21/07/06, Orri Ganel <[EMAIL PROTECTED]> wrote: > I'm working on the GUI for my extended iTunes search, which allows > searches far beyond the native iTunes capability. Once the search has > been completed, a window contining a Tix.CheckList with the resulting > tracks is displayed. If anyone

[Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread Orri Ganel
Hello all, I'm working on the GUI for my extended iTunes search, which allows searches far beyond the native iTunes capability. Once the search has been completed, a window contining a Tix.CheckList with the resulting tracks is displayed. If anyone has any idea how to figure out whether or

Re: [Tutor] : finding out if the horizontal scrollbar on a Tix.CheckList is being used or not

2006-07-21 Thread Orri Ganel
Oops, please send any questions to this email, not the one I sent the last message with. Thanks, Orri ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor