Re: How to set my gui?
On Friday 19 April 2013 22:16:18 Chris Angelico did opine: On Sat, Apr 20, 2013 at 9:10 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 19 Apr 2013 09:24:36 +1000, Chris Angelico ros...@gmail.com declaimed the following in gmane.comp.python.general: On Fri, Apr 19, 2013 at 8:57 AM, Walter Hurry walterhu...@lavabit.com wrote: On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. : :) Born in 1984, so that'll give you some idea where I was in the :1990s. : A puppy to be taught by greymuzzles (unfortunately, /this/ greymuzzle [1958] has reached the point of being an old dog that only learns new tricks with extreme difficulty G) Yep, taught by my Dad, who has often told the story of how he once held a whole kilobyte of memory in his hands (something like a cubic meter in size). He introduced me to programming, to fiddling with the system configs (actually he forbade that, for ages - because he had to clean up the mess if the system wouldn't boot), and to the joys of networking. So in a large way he's why I'm a geek... and actually he started that even earlier, when I was given the name Chris at birth. That on its own probably is the biggest cause of my geekery, I think! ChrisA Buncha spring chickens, the whole lot of you. Born in '34, I was a geek before the word was invented. But like some of you claim, I am now that old dog that doesn't learn new tricks easily. Cheers, Gene -- There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) My web page: http://coyoteden.dyndns-free.com:85/gene is up! My views http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml Mandrell: You know what I think? Doctor: Ah, ah that's a catch question. With a brain your size you don't think, right? -- Dr. Who A pen in the hand of this president is far more dangerous than a gun in the hands of 200 million law-abiding citizens. -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On Thu, 18 Apr 2013 23:24:29 +0200, Tracubik wrote: Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two buttons: keepy it and correct it (i.e. it will become italy) now this is quite simple but how can i do it properly? i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. Thanks MedeoTL One simple way Make a method to search for the next occorance use that as button click event. -- Faith: not *wanting* to know what is true. -- Friedrich Nietzsche -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
Hi, These days, GUI programming is to me just programming and calling on certain libraries/modules. +1 One thing you may want to consider is using your main thread for the UI, and spinning off another thread to do your search. But do that ONLY if you know you understand threads, and threading in Python. Otherwise you'll make your life unnecessarily hard. :) For simple tasks, you don't need threads, but can use the glib-functions timeout_add(), idle_add() etc. Roland -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On 19/04/2013 10:42, Alister wrote: On Thu, 18 Apr 2013 23:24:29 +0200, Tracubik wrote: Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two buttons: keepy it and correct it (i.e. it will become italy) now this is quite simple but how can i do it properly? i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. Thanks MedeoTL One simple way Make a method to search for the next occorance use that as button click event. Mmmmh, this seem good to me. But i also need to add some code in the __init__() of the GUI class to get the first occurence and put it in the text field. Thanks for your reply, you was really helpful MedeoTL -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On Sat, Apr 20, 2013 at 9:10 AM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 19 Apr 2013 09:24:36 +1000, Chris Angelico ros...@gmail.com declaimed the following in gmane.comp.python.general: On Fri, Apr 19, 2013 at 8:57 AM, Walter Hurry walterhu...@lavabit.com wrote: On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. :) Born in 1984, so that'll give you some idea where I was in the 1990s. A puppy to be taught by greymuzzles (unfortunately, /this/ greymuzzle [1958] has reached the point of being an old dog that only learns new tricks with extreme difficulty G) Yep, taught by my Dad, who has often told the story of how he once held a whole kilobyte of memory in his hands (something like a cubic meter in size). He introduced me to programming, to fiddling with the system configs (actually he forbade that, for ages - because he had to clean up the mess if the system wouldn't boot), and to the joys of networking. So in a large way he's why I'm a geek... and actually he started that even earlier, when I was given the name Chris at birth. That on its own probably is the biggest cause of my geekery, I think! ChrisA -- http://mail.python.org/mailman/listinfo/python-list
How to set my gui?
Hi all! I'm trying to make a simple program that essentially do this: 1) open a html file (extracted epub file) 2) search for occurrences like ita-ly 3) put them on a simple GUI: 1 text field and two buttons: keepy it and correct it (i.e. it will become italy) now this is quite simple but how can i do it properly? i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. Thanks MedeoTL -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. What GUI library are you using? -- John Gordon A is for Amy, who fell down the stairs gor...@panix.com B is for Basil, assaulted by bears -- Edward Gorey, The Gashlycrumb Tinies -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On 18/04/2013 23:27, John Gordon wrote: In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. What GUI library are you using? Gtk3 via Glade, anyway the problem is referred to all gui toolkit, isn't it? MedeoTL -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On Fri, Apr 19, 2013 at 7:36 AM, Tracubik affdfsdfds...@b.com wrote: On 18/04/2013 23:27, John Gordon wrote: In 5170648d$0$1368$4fafb...@reader2.news.tin.it Tracubik affdfsdfds...@b.com writes: i suppose i've to first generate the window and than populate it, but where i've to put the search for occurences code? I don't think init() is the right place.. What GUI library are you using? Gtk3 via Glade, anyway the problem is referred to all gui toolkit, isn't it? You're looking here for fairly broad and general advice on GUI code layout. Unfortunately that's so broad that all I can say is there are many ways to do it. :) Back in the 1990s, I used to (mostly) treat GUI programming as somewhat different from console programming. I'd use a window-builder, I'd structure my code in an event loop instead of top-down imperative, I'd use an IDE rather than simply coding in a text editor. But 1 Corinthians 13:11. These days, GUI programming is to me just programming and calling on certain libraries/modules. There are many ways to lay out code, and treating the GUI framework/boilerplate as the most important is only one of them. One thing you may want to consider is using your main thread for the UI, and spinning off another thread to do your search. But do that ONLY if you know you understand threads, and threading in Python. Otherwise you'll make your life unnecessarily hard. :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. -- http://mail.python.org/mailman/listinfo/python-list
Re: How to set my gui?
On Fri, Apr 19, 2013 at 8:57 AM, Walter Hurry walterhu...@lavabit.com wrote: On Fri, 19 Apr 2013 08:00:11 +1000, Chris Angelico wrote: But 1 Corinthians 13:11 You are grown up now, I surmise. :) Born in 1984, so that'll give you some idea where I was in the 1990s. ChrisA -- http://mail.python.org/mailman/listinfo/python-list