Re: not pack methon in tkinter

2009-03-28 Thread dwblas
Pack() is a separate class for all widgets and not specific to the Label widget i.e all widgets are "packed" into the parent. Here is some documentation on the pack class http://effbot.org/tkinterbook/pack.htm http://epydoc.sourceforge.net/stdlib/Tkinter.Pack-class.html -- http://mail.python.org/m

Re: Compare 2 files and discard common lines

2008-05-29 Thread dwblas
On May 29, 1:36 am, loial <[EMAIL PROTECTED]> wrote: > only those lines that appear in the 2nd file but not in the 1st file. set(file_2_recs).difference(set(file_1_recs)) will give the recs in file_2 that are not in file_1 if you can store both files in memory. Sets are indexed and so are faster t

Re: simple beginner question about lists and negative index

2008-05-03 Thread dwblas
On May 1, 10:04 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "jmDesktop" <[EMAIL PROTECTED]> wrote in message > | > | s = 'abcde' > | i = -1 > | for i in range (-1, -len(s), -1): > |print s[:i], i > | Why doesn't the first one have the e if -1 is the end of the list? That should be obvious.

Linux Journal Survey

2008-01-23 Thread dwblas
The annual Linux Journal survey is online now for any Linux users who want to vote for Python. http://www.linuxjournal.com/node/1006101 -- http://mail.python.org/mailman/listinfo/python-list

Re: time.time or time.clock

2008-01-14 Thread dwblas
""" time.clock() isn't high enough resolution for Ubuntu, and time.time() isn't high enough resolution on windows. Take a look at datetime. It is good to the micro-second on Linux and milli-second on Windows. """ import datetime begin_time=datetime.datetime.now() for j in range(10): x =

Re: Tk Tkinter : multiple file selection dialog over multiple directories ?

2007-12-15 Thread dwblas
The simple/obvious way is click a "save" button which appends the files selected into a list. Then move on to the next directory and repeat. Is there a reason why this won't work? -- http://mail.python.org/mailman/listinfo/python-list

Re: Lists and Sublists

2007-10-23 Thread dwblas
> I am struggling to work out what is the ideal Python data structure > for the above. Any help would be greatly appreciated. The normal way is to use a dictionary of lists. The key would be the dictionary key, which would contain a list or a list of lists, that is each name would be an element