Re: [Code Challenge] WxPython versus Tkinter.

2011-01-23 Thread Stefan Behnel
rantingrick, 23.01.2011 01:07: I have in many threads declared that Tkinter (and TclTk) is currently --and has been for a decade-- the wrong choice for Python's stdlib GUI. [...] It is time to prove once and for all how dated and worthless Tkinter is compared to wxPython. What's the aim of tha

Re: WxPython versus Tkinter.

2011-01-23 Thread rusi
On Jan 23, 5:07 am, rantingrick wrote: > WxPython versus Tkinter (A code battle to the death!) > > by Rick Johnson. > > I have in many threads declared that Tkinter (and TclTk) is currently > --and has been for a decade-- the wrong choice for Python's stdlib > GUI. Throughout the 90's Tkinter was

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 02:18:34 -0800, rusi wrote: >>  WxPython code: [...] > Tried the code with debian sid and default python (2.6) > > I get (after some loading... statements) > > Segmentation fault > > [Actually this is the first time in my 10 years of python that Ive seen > a pure python mod

Re: WxPython versus Tkinter.

2011-01-23 Thread Adam Skutt
On Jan 22, 7:07 pm, rantingrick wrote: > So PUT UP OR SHUT THE HELL UP! You first. Write actual working code first and then you can challenge people. I found 5 bugs in your code before I quit looking[1]. Can you find and fix them all? Also, I'm entirely ignoring the bad styling, bad default si

Re: Which non SQL Database ?

2011-01-23 Thread Roy Smith
In article , Deadly Dirk wrote: > The same thing applies to MongoDB which is equally fast but does allow ad > hoc queries and has quite a few options how to do them. It allows you to > do the same kind of querying as RDBMS software, with the exception of > joins. No joins. Well, sort of. Y

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 05:18 AM, rusi wrote: Tried the code with debian sid and default python (2.6) I get (after some loading... statements) Segmentation fault [Actually this is the first time in my 10 years of python that Ive seen a pure python module segfault :-) ] I also have a segfault. You sho

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 22, 9:39 pm, Terry Reedy wrote: > On 1/22/2011 7:07 PM, rantingrick wrote: > > Near the beginning of this thread, I gently challenged you to produce a > concrete, practical proposal for an stdlib addition that could be > critiqued and improved. When you asked for problems with > wxwidgets/w

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 1:53 am, "Octavian Rasnita" wrote: > I have downloaded that simple program, launched it, and I've tested it with > JAWS screen reader. > It was fully accessible out of the box. Excellent! > Have you done something special for making it accessible for screen readers? > (I guess not)

Re: [Code Challenge] WxPython versus Tkinter.

2011-01-23 Thread Arndt Roger Schneider
rantingrick schrieb: [snip] 1. You cannot define the terms--restrict your opponent-- and battle it yourselves. 2. Your specified directory browser is useless. --At least define that the directory browser must have constant complexity to work with volatile data over a network...

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 4:18 am, rusi wrote: > On Jan 23, 5:07 am, rantingrick wrote: > > > > > > > > > > > WxPython versus Tkinter (A code battle to the death!) > > > by Rick Johnson. > > > I have in many threads declared that Tkinter (and TclTk) is currently > > --and has been for a decade-- the wrong choic

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 7:35 am, Adam Skutt wrote: > On Jan 22, 7:07 pm, rantingrick wrote: > You first.  Write actual working code first and then you can challenge > people. The code does work. You just lack the skill to run it. > I found 5 bugs in your code before I quit looking[1]. What are these "so-c

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 4:10 am, Stefan Behnel wrote: > rantingrick, 23.01.2011 01:07: > > > I have in many threads declared that Tkinter (and TclTk) is currently > > --and has been for a decade-- the wrong choice for Python's stdlib > > GUI.  [...] > > It is time to prove once and for all how dated and worthl

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 11:06 am, Arndt Roger Schneider wrote: > rantingrick schrieb: > > [snip] > > 1. You cannot define the terms--restrict your opponent-- >     and battle it yourselves. > 2. Your specified directory browser is useless. >     --At least define that the directory browser must have >       co

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 22, 6:07 pm, rantingrick wrote: > I await any challengers... So far only trolls (besides Terry, Octavian, D'Aprano) have replied. In my time here within the Python community i have only met one person who shares my in-depth knowledge of Tkinter. That person is Kevin Waltzer. So outside o

Re: Need GUI pop-up to edit a (unicode ?) string

2011-01-23 Thread Grant Edwards
On 2011-01-22, Corey Richardson wrote: > If that is all you need, I suggest Tkinter. Nice and easy, comes built > into Python. In some Linux distros, that is. Not in all of them. -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 09:31:25 -0800, rantingrick wrote: > So far only trolls (besides Terry, Octavian, D'Aprano) have replied. So apart from the non-trolls, only trolls have replied? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 09:21:57 -0800, rantingrick wrote: > Wait a minute, i am confused? What language is Python written in? Oh > thats right Lisp! I am so dumb. How did i even get this job? :-) Python is written in C, Java, C#, Javascript, Haskell, Ocaml, and, yes, even Lisp. There's even a Pytho

Re: WxPython versus Tkinter.

2011-01-23 Thread Adam Skutt
On Jan 23, 12:21 pm, rantingrick wrote: > The code does work. You just lack the skill to run it. I not only possess the skill to run it, but to find fault it in through simple inspection. All of the bugs I found, but one, I found through reading the .py file. Heck, I'm so good that I guessed two

documentation / reference help

2011-01-23 Thread Scott Meup
I'm trying tolearn Python. The documentation tells syntax, and other things about a command. But for too many commands, it doesn't tell what it does. for instance, in VB the 'return' command tells the program what line to execute after some event (usually an error). In Python it appears to ret

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 12:09 pm, Adam Skutt wrote: > On Jan 23, 12:21 pm, rantingrick wrote: > > What are these "so-called" bugs exactly? > > 1. There's a bug related to loading of your resources. > 2. There's a bug related to when file I/O is performed. > 3/4. There's at least two bugs related to handling

Re: documentation / reference help

2011-01-23 Thread Littlefield, Tyler
The return value simply returns a value to the calling function, which the function can handle, however it wants. so: for example def add(a, b): return (a+b) That simply returns the value a+b, which you can use however you like, like so: i=add(2,3) will assign the return value to add. I rec

Re: WxPython versus Tkinter.

2011-01-23 Thread Adam Skutt
On Jan 23, 2:07 pm, rantingrick wrote: > Well then post a traceback. None of these issues will supply a traceback; in fact, in some of these cases, you went out of your way to ensure that would not happen. That's an additional bug (or 5 additional bugs depending how mean your tester/QA staff are

Re: documentation / reference help

2011-01-23 Thread Emile van Sebille
On 1/23/2011 10:41 AM Scott Meup said... I'm trying tolearn Python. The documentation tells syntax, and other things about a command. But for too many commands, it doesn't tell what it does. for instance, in VB the 'return' command tells the program what line to execute after some event (usuall

Re: documentation / reference help

2011-01-23 Thread CM
On Jan 23, 2:38 pm, "Littlefield, Tyler" wrote: > The return value simply returns a value to the calling function, which > the function can handle, however it wants. so: for example > def add(a, b): >    return (a+b) > > That simply returns the value a+b, which you can use however you like, > like

Re: documentation / reference help

2011-01-23 Thread Chris Rebert
On Sun, Jan 23, 2011 at 11:52 AM, CM wrote: > On Jan 23, 2:38 pm, "Littlefield, Tyler" wrote: >> The return value simply returns a value to the calling function, which >> the function can handle, however it wants. so: for example >> def add(a, b): >>    return (a+b) >> >> That simply returns the

Re: Which non SQL Database ?

2011-01-23 Thread John Nagle
On 1/22/2011 10:15 PM, Deadly Dirk wrote: On Sat, 04 Dec 2010 16:42:36 -0600, Jorge Biquez wrote: Hello all. Newbie question. Sorry. As part of my process to learn python I am working on two personal applications. Both will do it fine with a simple structure of data stored in files. I now the

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 1:42 pm, Adam Skutt wrote: > On Jan 23, 2:07 pm, rantingrick wrote: > > > Well then post a traceback. > > None of these issues will supply a traceback; in fact, in some of > these cases, you went out of your way to ensure that would not > happen.   psst: thats because they are FEATURE

A and B but not C in list

2011-01-23 Thread CM
In Python, is there a recommended way to write conditionals of the form: "if A and B but not C or D in my list, do something." ? I may also have variations on this, like "if A but not B, C, or D". Do I have to just write out all the if and elifs with all possible conditions, or is there a handi

Re: WxPython versus Tkinter.

2011-01-23 Thread Littlefield, Tyler
RR, I have not seen anything useful from you thus far, except: 1) "you disagree with me, troll you must be," "2) who cares if my programs have bugs and don't compile cross-platform, defective code is code, none the less. 3) And a lot of unfounded arrogance in stating that no one understands Tkin

Re: A and B but not C in list

2011-01-23 Thread Corey Richardson
On 01/23/2011 04:05 PM, CM wrote: In Python, is there a recommended way to write conditionals of the form: "if A and B but not C or D in my list, do something." ? I may also have variations on this, like "if A but not B, C, or D". Do I have to just write out all the if and elifs with all poss

Re: A and B but not C in list

2011-01-23 Thread Chris Rebert
On Sun, Jan 23, 2011 at 1:05 PM, CM wrote: > In Python, is there a recommended way to write conditionals of the > form: > > "if A and B but not C or D in my list, do something."  ? > > I may also have variations on this, like "if A but not B, C, or D". > > Do I have to just write out all the if an

ANN: pyftpdlib 0.6.0 released

2011-01-23 Thread Giampaolo Rodolà
Hi, I'm pleased to announce release 0.6.0 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib/ === About === Python FTP server library provides an high-level portable interface to easily write asynchronous FTP/S servers with Python. Based on asyncore framework pyftpdlib i

Re: A and B but not C in list

2011-01-23 Thread Christian Heimes
Am 23.01.2011 22:05, schrieb CM: > In Python, is there a recommended way to write conditionals of the > form: > > "if A and B but not C or D in my list, do something." ? > > I may also have variations on this, like "if A but not B, C, or D". > > Do I have to just write out all the if and elifs

Re: Need GUI pop-up to edit a (unicode ?) string

2011-01-23 Thread Rikishi42
On 2011-01-22, geremy condra wrote: > If windows doesn't matter to you, just use Zenity. Here's a python > function wrapping zenity that does what you want: > > import commands > > def confirm_or_edit(s): > zenity = 'zenity' > mode = '--entry' > text = "--text='Please confirm or edit t

Re: WxPython versus Tkinter.

2011-01-23 Thread Adam Skutt
On Jan 23, 3:23 pm, rantingrick wrote: > psst: thats because they are FEATURES and NOT BUGS you idiot! Your application not displaying a directory listing, due to one of these "features", is desirable behavior? I think not. Your application hanging, due to one of these "features" is desirable b

Re: WxPython versus Tkinter.

2011-01-23 Thread Nicholas Devenish
Hi Adam, I'm still learning my way around wxPython and gui programming, been mostly linux and CLI since Visual Basic 5, and only recently started learning it. On 23/01/2011 18:09, Adam Skutt wrote: 1. There's a bug related to loading of your resources. 2. There's a bug related to when file I

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 3:11 pm, "Littlefield, Tyler" wrote: > if you can't manage to provide cross-platform bug-free code. No one has posted even one traceback Tyler (including yourself!). And until they do i will assume that my code is bug free. I know it to be bug free on windows. If and when someone *act

Re: WxPython versus Tkinter.

2011-01-23 Thread David Boddie
On Sunday 23 January 2011 17:57, rantingrick wrote: > On Jan 22, 9:39 pm, Terry Reedy wrote: >> On 1/22/2011 7:07 PM, rantingrick wrote: >> >> Near the beginning of this thread, I gently challenged you to produce a >> concrete, practical proposal for an stdlib addition that could be >> critiqued

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 05:08 PM, rantingrick wrote: On Jan 23, 3:11 pm, "Littlefield, Tyler" wrote: if you can't manage to provide cross-platform bug-free code. No one has posted even one traceback Tyler (including yourself!). And until they do i will assume that my code is bug free. I know it to be

How to execute foreing code from Python

2011-01-23 Thread hidura
Hello i want to code from different languages using a Python script i know i can use os.system, but i don't know how to receive data or send arguments using that method if theres any another way to make it or there's a way to send arguments and receive data using os.system? Thanks in advanc

Re: Which non SQL Database ?

2011-01-23 Thread Verde Denim
On Sun, Jan 23, 2011 at 3:19 PM, John Nagle wrote: > On 1/22/2011 10:15 PM, Deadly Dirk wrote: > >> On Sat, 04 Dec 2010 16:42:36 -0600, Jorge Biquez wrote: >> >> Hello all. >>> >>> Newbie question. Sorry. >>> >>> As part of my process to learn python I am working on two personal >>> applications

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 12:23:13 -0800, rantingrick wrote: > I am not > trying to create a working file browser so you can steal my code. Dammit! There goes my brilliant idea for getting rich. Step 1: Start company. Step 2: Steal working file browser from Internet. Step 4: Profit! I think ranting

Re: A and B but not C in list

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 22:34:33 +0100, Christian Heimes wrote: > It's easier and faster if you convert the lists to sets first: > > your_set = set(your_list) > > if your_set.issuperset(set([A, B])) and your_set.isdisjoint(set([C, > D])): > ... "Easier" is a close thing. I find this easier to r

Re: [Code Challenge] WxPython versus Tkinter.

2011-01-23 Thread Kevin Walzer
I found this code in the Demo/tkinter/ttk directory of the Python 2.7.1 source distribution. I'm NOT the author (credit should probably go to Guilherme Polo, developer of the Tkinter wrapper for the ttk themed widgets that is now in the stdlib). But, using a tree/listview widget that is part of

Re: WxPython versus Tkinter.

2011-01-23 Thread Martin v. Loewis
>> Segmentation fault >> >> [Actually this is the first time in my 10 years of python that Ive >> seen a pure python module segfault :-) ] > > Congratulations genius! However if you are really smart you would have > read the note in the source that says "tested on windows only!". > Segfault. Thank

Re: How to execute foreing code from Python

2011-01-23 Thread Chris Rebert
On Sun, Jan 23, 2011 at 2:21 PM, wrote: > Hello i want to code from different languages using a Python script i know i > can use os.system, but i don't know how to receive data or send arguments > using that method if theres any another way to make it or there's a way to > send arguments and rece

Re: WxPython versus Tkinter.

2011-01-23 Thread Martin v. Loewis
> For something as common as displaying a file browser, it should be as > simple as this: > > import gui_toolkit # whichever > path = gui_toolkit.select_file() > > Something like zenity: > > [steve@sylar ~]$ zenity --file-selection > /home/steve/python/findsingle.py And indeed, it is that si

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 22, 6:07 pm, rantingrick wrote: > I await any challengers... WxPython Challenge 1 code updated... * Fixed tab traveral * Removed hand-holding code * Removed some cruft https://sites.google.com/site/thefutureofpython/home/code-challenges Good luck! -- http://mail.python.org/mailm

Re: WxPython versus Tkinter.

2011-01-23 Thread Martin v. Loewis
> WxPython Challenge 1 code updated... > > * Fixed tab traveral > * Removed hand-holding code > * Removed some cruft > > https://sites.google.com/site/thefutureofpython/home/code-challenges > > Good luck! Still crashes the interpreter. Regards, Martin -- http://mail.python.org/mailman/li

Re: A and B but not C in list

2011-01-23 Thread Terry Reedy
On 1/23/2011 4:05 PM, CM wrote: In Python, is there a recommended way to write conditionals of the form: "if A and B but not C or D in my list, do something." ? I may also have variations on this, like "if A but not B, C, or D". Do I have to just write out all the if and elifs with all possib

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 07:07 PM, rantingrick wrote: On Jan 22, 6:07 pm, rantingrick wrote: I await any challengers... WxPython Challenge 1 code updated... * Fixed tab traveral * Removed hand-holding code * Removed some cruft https://sites.google.com/site/thefutureofpython/home/code-challe

Re: How to execute foreing code from Python

2011-01-23 Thread Dave Angel
On 01/-10/-28163 02:59 PM, hid...@gmail.com wrote: Hello i want to code from different languages using a Python script i know i can use os.system, but i don't know how to receive data or send arguments using that method if theres any another way to make it or there's a way to send arguments and r

Re: documentation / reference help

2011-01-23 Thread Terry Reedy
On 1/23/2011 1:41 PM, Scott Meup wrote: I'm trying tolearn Python. The documentation tells syntax, and other things about a command. But for too many commands, it doesn't tell what it does. for instance, in VB the 'return' command tells the program what line to execute after some event (usually

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 5:23 pm, Kevin Walzer wrote: > I found this code in the Demo/tkinter/ttk directory of the Python 2.7.1 > source distribution. I'm NOT the author (credit should probably go to > Guilherme Polo, developer of the Tkinter wrapper for the ttk themed > widgets that is now in the stdlib). But,

Re: WxPython versus Tkinter.

2011-01-23 Thread Kevin Walzer
On 1/23/11 8:12 PM, rantingrick wrote: The only way i can respond to this is to quite the requirements for my challenge... --- Challenge 1: (Simple Directory Viewer) --- Create a simple Directory Viewer GUI. You CANNOT us

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Mon, 24 Jan 2011 00:44:57 +0100, Martin v. Loewis wrote: >> For something as common as displaying a file browser, it should be as >> simple as this: >> >> import gui_toolkit # whichever >> path = gui_toolkit.select_file() >> >> Something like zenity: >> >> [steve@sylar ~]$ zenity --file-sel

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 5:27 pm, "Martin v. Loewis" wrote: > Since you are asking for a traceback, here is one: [...snip: barf...] > If you had expected a Python traceback, sorry Rick: it didn't produce > one, since it crashed. Well i did "expect" that you would at least include some info as to your OS and

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 5:44 pm, "Martin v. Loewis" wrote: > > For something as common as displaying a file browser, it should be as > > simple as this: > > > import gui_toolkit  # whichever > > path = gui_toolkit.select_file() > > > Something like zenity: > > > [steve@sylar ~]$ zenity --file-selection > > /ho

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 6:31 pm, "Martin v. Loewis" wrote: > > WxPython Challenge 1 code updated... > > >  * Fixed tab traveral > >  * Removed hand-holding code > >  * Removed some cruft > > >  https://sites.google.com/site/thefutureofpython/home/code-challenges > > > Good luck! > > Still crashes the interpret

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 6:30 pm, Corey Richardson wrote: > On 01/23/2011 07:07 PM, rantingrick wrote: > > > On Jan 22, 6:07 pm, rantingrick  wrote: > > >> I await any challengers... > > > WxPython Challenge 1 code updated... > > >   * Fixed tab traveral > >   * Removed hand-holding code > >   * Removed some cr

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 7:16 pm, Kevin Walzer wrote: > On 1/23/11 8:12 PM, rantingrick wrote: > > > The only way i can respond to this is to quite the requirements for my > > challenge... > > > --- > >   Challenge 1: (Simple Directory Viewer) > >

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 7:18 pm, Steven D'Aprano wrote: > On Mon, 24 Jan 2011 00:44:57 +0100, Martin v. Loewis wrote: > >> For something as common as displaying a file browser, it should be as > >> simple as this: > > >> import gui_toolkit  # whichever > >> path = gui_toolkit.select_file() > > >> Something lik

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 08:25 PM, rantingrick wrote: On Jan 23, 5:44 pm, "Martin v. Loewis" wrote: For something as common as displaying a file browser, it should be as simple as this: import gui_toolkit # whichever path = gui_toolkit.select_file() Something like zenity: [steve@sylar ~]$ zenity

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 7:40 pm, Corey Richardson wrote: > Why can't we use a TreeCtrl? If we can't use all our widgets, why can > you use all yours? > > ~Corey Columns Corey, the key word here is "columns". One more time...COOLUUUMMMNNN. Is this starting to sink in yet Corey? -- http://mail.pyt

Re: How to execute foreing code from Python

2011-01-23 Thread Dan Stromberg
On Sun, Jan 23, 2011 at 4:24 PM, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, hid...@gmail.com wrote: >> >> Hello i want to code from different languages using a Python script i >> know i can use os.system, but i don't know how to receive data or send >> arguments using that method if theres any

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 08:50 PM, rantingrick wrote: On Jan 23, 7:40 pm, Corey Richardson wrote: Why can't we use a TreeCtrl? If we can't use all our widgets, why can you use all yours? ~Corey Columns Corey, the key word here is "columns". One more time...COOLUUUMMMNNN. Is this starting t

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 08:28 PM, rantingrick wrote: On Jan 23, 6:30 pm, Corey Richardson wrote: On 01/23/2011 07:07 PM, rantingrick wrote: On Jan 22, 6:07 pm, rantingrickwrote: I await any challengers... WxPython Challenge 1 code updated... * Fixed tab traveral * Removed hand-holdin

Re: WxPython versus Tkinter.

2011-01-23 Thread Kevin Walzer
On 1/23/11 8:33 PM, rantingrick wrote: Well wxPython ha a treectrl too. And if we were comparing apples to apples then we would compare the wx.TreeCtrl to the Tk::TreeCtrl. However there are many things that a ListCtrl can do that a treectrl can't. The biggest difference COLUMNS The ttk::t

Re: How to execute foreing code from Python

2011-01-23 Thread Hidura
Thanks to all for your fast responses. I will use this on a server running on Linux, so there is no problem with the OS and probably i will try to pipes and subprocess, but the pipes worry me because i can't stop the process using timeout or i don't found how to stop it... 2011/1/23, Dan Stromber

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 8:06 pm, Corey Richardson wrote: > > Columns Corey, the key word here is "columns". One more > > time...COOLUUUMMMNNN. Is this starting to sink in yet > > Corey? > > I sent that email before you sent your email explaining why (responded > to Kevin), sorry that I can't see t

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 8:07 pm, Corey Richardson wrote: > because imageIdx is just a dictionary, No, imageIdx is an integer. -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 23, 8:16 pm, Kevin Walzer wrote: > The ttk::treeview widget can also function as a multi-column listbox, > and can include both tree and multi-column listbox features in a single > window. It's a very flexible widget. Can we see some working code? I would love to see some code Kevin. You

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 09:29 PM, rantingrick wrote: On Jan 23, 8:07 pm, Corey Richardson wrote: because imageIdx is just a dictionary, No, imageIdx is an integer. You're right. imageIdx = self.imageMap[iconname] I confused imageIdx with self.imageMap. But that still doesn't fix my problem, so bef

Re: WxPython versus Tkinter.

2011-01-23 Thread rantingrick
On Jan 22, 6:07 pm, rantingrick wrote: > I await any challengers... CODE UPDATE: * removed sys.maxint (not sure how it got there?) https://sites.google.com/site/thefutureofpython/home/code-challenges -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread Steven D'Aprano
On Sun, 23 Jan 2011 17:50:24 -0800, rantingrick wrote: > On Jan 23, 7:40 pm, Corey Richardson wrote: > >> Why can't we use a TreeCtrl? If we can't use all our widgets, why can >> you use all yours? >> >> ~Corey > > Columns Corey, the key word here is "columns". One more > time...COOLUUU

Re: A and B but not C in list

2011-01-23 Thread Ian Kelly
On Sun, Jan 23, 2011 at 2:34 PM, Christian Heimes wrote: > your_set = set(your_list) > > if your_set.issuperset(set([A, B])) and your_set.isdisjoint(set([C, D])): if your_set.intersection([A, B, C, D]) == set([A, B]): ... Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: WxPython versus Tkinter.

2011-01-23 Thread Corey Richardson
On 01/23/2011 09:47 PM, rantingrick wrote: On Jan 22, 6:07 pm, rantingrick wrote: I await any challengers... CODE UPDATE: * removed sys.maxint (not sure how it got there?) https://sites.google.com/site/thefutureofpython/home/code-challenges In the example at http://www.wxpython.org/O

Re: WxPython versus Tkinter.

2011-01-23 Thread Littlefield, Tyler
>PS: Be sure not to cause any segfaults because these linux folks can't >debug for shite! Or maybe it is that the person fighting and throwing insults around like candy at a parade can't code for shite. Or *gasp* the library that is supposedly cross-platform has issues on certain platforms. You

Re: WxPython versus Tkinter.

2011-01-23 Thread rusi
On Jan 24, 9:16 am, "Littlefield, Tyler" wrote: >  >PS: Be sure not to cause any segfaults because these linux folks can't >  >debug for shite! > Or maybe it is that the person fighting and throwing insults around like > candy at a parade can't code for shite. Or *gasp* the library that is > suppo

Get input in Python

2011-01-23 Thread Santhosh Kumar
Hi all, I am trying to get input from the file* open(sys.argv[1]). *So, while executing I will refer it as python filename.py sample_file.txt this will root to my sys.argv[]. So I need to follow the same but I also need to give input Example : python filename.py . How should I do codi

Re: Get input in Python

2011-01-23 Thread Chris Rebert
On Sun, Jan 23, 2011 at 10:10 PM, Santhosh Kumar wrote: > Hi all, >           I am trying to get input from the file open(sys.argv[1]). So, > while executing I will refer it as python filename.py  sample_file.txt  this > will root to my sys.argv[]. So I need to follow the same but I also need to >

Converting functions

2011-01-23 Thread iu2
Hi all, I'm trying to convert functions - pass a few functions to a converting function, which change their behaviour and return the changed functions: >>> def cfuncs(*funcs): n = [] for f in funcs: def ff(*args, **key): print 'Start!', f.fu

Re: [Code Challenge] WxPython versus Tkinter.

2011-01-23 Thread Octavian Rasnita
From: "Kevin Walzer" I found this code in the Demo/tkinter/ttk directory of the Python 2.7.1 source distribution. I'm NOT the author (credit should probably go to Guilherme Polo, developer of the Tkinter wrapper for the ttk themed widgets that is now in the stdlib). But, using a tree/listview

Re: WxPython versus Tkinter.

2011-01-23 Thread Octavian Rasnita
From: "Littlefield, Tyler" >PS: Be sure not to cause any segfaults because these linux folks can't >debug for shite! Or maybe it is that the person fighting and throwing insults around like candy at a parade can't code for shite. Or *gasp* the library that is supposedly cross-platform has issu

Re: WxPython versus Tkinter.

2011-01-23 Thread Octavian Rasnita
From: "rantingrick" On Jan 23, 5:44 pm, "Martin v. Loewis" wrote: > For something as common as displaying a file browser, it should be as > simple as this: > import gui_toolkit # whichever > path = gui_toolkit.select_file() > Something like zenity: > [steve@sylar ~]$ zenity --file-selection

switch from default env to virtualenv and back in script

2011-01-23 Thread fara
Hi, My default environment uses Python2.6 but I have a also virtualenv with Python2.7 with different packages. Is it possible to write a script where some parts are executed in the default Python2.6 environment and some others in the Python2.7 virtualenv. Something like this: # Start of pse

Re: WxPython versus Tkinter.

2011-01-23 Thread Noah Hall
On Sun, Jan 23, 2011 at 5:31 PM, rantingrick wrote: > So far only trolls (besides Terry, Octavian, D'Aprano) have replied. > In my time here within the Python community i have only met one person > who shares my in-depth knowledge of Tkinter. That person is Kevin > Waltzer. So outside of Python-de

Re: Converting functions

2011-01-23 Thread Peter Otten
iu2 wrote: > I'm trying to convert functions - pass a few functions to a converting > function, which change their behaviour and return the changed > functions: > > >>> def cfuncs(*funcs): > n = [] > for f in funcs: > def ff(*args, **key): >