Re: Sort items in wxListCtrl

2011-11-02 Thread Ric
On Wed, 2 Nov 2011 08:08:48 -0700 (PDT), Miki Tebeka wrote: >wx.FileDialog shows files and directories. If you need the user to pick one, >this is the standard way. Otherwise, if you need custom view on the file >system then probably list control is the right way to go. Again, the demo has >a

Re: Sort items in wxListCtrl

2011-11-01 Thread Ric
On Tue, 1 Nov 2011 16:14:50 -0700 (PDT), Miki Tebeka wrote: >Why not use the build in wx.FileDialog? > >Also, have a look at the demo that comes with wxPython. It has an example with >a sortable list control. Thanks for responding, How would wx.FileDialog help me in this case? I am trying to di

Sort items in wxListCtrl

2011-11-01 Thread Ric
I am trying to create a small application in wxPython and would like to ask for some help. I am trying to display folders and files in ListCtrl but sorted first folders followed by files (like in a file manager style) but not sure how to do this? Would I need to do this in code somehow or ListCt

Re: ttk Listbox

2011-10-31 Thread Ric
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer wrote: >On 10/31/11 12:37 AM, Ric@rdo wrote: >> >> What would be an equivalent widget in ttk like a Listbox and if >> possible a small example? I tried to look here >> http://docs.python.org/library/ttk.html but did not

Re: ttk Listbox

2011-10-31 Thread Ric
On Mon, 31 Oct 2011 10:00:22 -0400, Kevin Walzer wrote: >On 10/31/11 12:37 AM, Ric@rdo wrote: >> >> What would be an equivalent widget in ttk like a Listbox and if >> possible a small example? I tried to look here >> http://docs.python.org/library/ttk.html but did not

ttk Listbox

2011-10-30 Thread Ric
What would be an equivalent widget in ttk like a Listbox and if possible a small example? I tried to look here http://docs.python.org/library/ttk.html but did not see anything. Maybe I did not look in the right place? tia -- http://mail.python.org/mailman/listinfo/python-list

Re: Arrange files according to a text file

2011-08-27 Thread Ric
No, it turned out to be my mistake. Your code was correct and I appreciate it very much. Thank you again On Sat, 27 Aug 2011 18:10:07 -0700, Emile van Sebille wrote: >On 8/27/2011 4:18 PM r...@rdo.python.org said... >> Thank you so much. The code worked perfectly. >> >> This is what I tried us

Re: Arrange files according to a text file

2011-08-27 Thread Ric
On Sun, 28 Aug 2011 00:48:20 +0100, MRAB wrote: >On 28/08/2011 00:18, r...@rdo.python.org wrote: >> Thank you so much. The code worked perfectly. >> >> This is what I tried using Emile code. The only time when it picked >> wrong name from the list was when the file was named like this. >> >> Data

Re: Arrange files according to a text file

2011-08-27 Thread Ric
Thank you so much. The code worked perfectly. This is what I tried using Emile code. The only time when it picked wrong name from the list was when the file was named like this. Data Mark Stone.doc How can I fix this? Hope I am not asking too much? import os from difflib import SequenceMatche

Re: Arrange files according to a text file

2011-08-27 Thread Ric
Hello Emile , Thank you for the code below as I have not encountered SequenceMatcher before and would have to take a look at it closer. My question would it work for a text file list of names about 25k lines and a directory with say 100 files inside? Thank you once again. On Sat, 27 Aug 2011

Arrange files according to a text file

2011-08-27 Thread Ric
Hello, What would be the best way to accomplish this task? I have many files in separate directories, each file name contain a persons name but never in the same spot. I need to find that name which is listed in a large text file in the following format. Last name, comma and First name. The last n

Returning histogram-like data for items in a list

2005-07-22 Thread Ric Deez
t;>> L2 [((1, 3), 2), ((2, 2), 2), ((3, 1), 2)] i.e. I don't understand why each tuple is being counted as well. Regards, Ric -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacing last comma in 'C1, C2, C3' with 'and' so that it reads'C1, C2 and C3'

2005-07-12 Thread Ric Da Force
. Thanks again! Ric "Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ric Da Force said unto the world upon 12/07/2005 02:43: >> Hi, >> >> I have a string such as 'C1, C2, C3'. Without assuming that each bit of >&

Replacing last comma in 'C1, C2, C3' with 'and' so that it reads 'C1, C2 and C3'

2005-07-11 Thread Ric Da Force
Hi, I have a string such as 'C1, C2, C3'. Without assuming that each bit of text is of fixed size, what is the easiest way to change this list so that it reads: 'C1, C2 and C3' regardless of the length of the string. Regards and sorry for the newbie questi

Re: Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
How does setdefault work exactly? I am looking in the docs and can't figure it out... Ric "Ric Da Force" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you guys! (Reinhold, Mark and Markus) I must confess that I am > absolutely awe struck at

Re: Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
Thank you guys! (Reinhold, Mark and Markus) I must confess that I am absolutely awe struck at the power of this language! There is no way in the world that I would have envisaged such simple and elegant solutions!!! Reinhold, is your solution specific to 2.4? Kind Regards, Ric "Rei

Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
ues. NewDict = {'This is repeated':['rt','sr'],'This is not':['gf']} I am still learning Python and have struggled with this for hours before deciding to go for help. Unfortunately, I didn't really know how to search for this in google and d

What are __slots__ used for?

2005-07-04 Thread Ric Da Force
I am a C# programmer and new to the language and I am trying to debug some code which uses this feature. Can anyone elaborate on what it is and how it is used? Regards, Ric -- http://mail.python.org/mailman/listinfo/python-list