Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?
Take a look at kivy at http://kivy.org. On Thursday, July 4, 2013 6:23:41 AM UTC-7, Aseem Bansal wrote: > I want to start GUI development using Tkinter in Python 2.7.5. > > > > I have been searching all over google but couldn't find any IDE that has > drag-and-drop feature for Python GUI development. Tried to ask on > stackoverflow > > > > (http://stackoverflow.com/questions/17439620/an-ide-with-drag-and-drop-feature-for-python-2-7-tkinter) > > > > but couldn't get an answer there. So is there any IDE that can be used for > GUI developemnt and has drag-and-drop feature for Python GUI dev? > > > > I came across somewhere that eclipse's pydev plugin can be used but couldn't > find anything on its website. > > > > Any advice about this? -- http://mail.python.org/mailman/listinfo/python-list
Re: Ideal way to separate GUI and logic?
[email protected] wrote: > So as a general idea, I should at the very least separate the GUI from the > program logic by defining the logic as a function, correct? And the next > level of separation is to define the logic as a class in one or more separate > files, and then import it to the file with the GUI, correct? > > My next question is, to what degree should I 'slice' my logic into functions? > How small or how large should one function be, as a rule of thumb? The way I do this is to write unit tests against the class and the functions (take a look at the unittest module). The functions methods (take a look at the unittest module). Each function should contain the smallest bit of testable logic. Another way to think about this is that each function should contain the smallest piece of logic that you can describe as one action. - Asim Jalis -- http://mail.python.org/mailman/listinfo/python-list
Re: Tutorials on Jinja
On Wednesday, June 24, 2009 11:46:55 AM UTC-7, Saurabh wrote: > Hi All, > > I am trying to move my application on a MVC architecture and plan to > use Jinja for the same. Can anyone provide me with few quick links > that might help me to get started with Jinja? > > Thanks, > Saby The documentation at http://jinja.pocoo.org/docs/templates is pretty good. Also this link contains an end-to-end example which might be helpful. https://gist.github.com/warren-runk/1317933 - Asim -- http://mail.python.org/mailman/listinfo/python-list
Re: Understanding other people's code
On Friday, July 12, 2013 7:22:59 AM UTC-7, Azureaus wrote: > Hi all, > I've been asked to take over a project from someone else and to extend the > functionality of this. The project is written in Python which I haven't had > any real experience with (although I do really like it) so I've spent the > last week or two settling in, trying to get my head around Python and the way > in which this code works. Here are some techniques I use in these situations. 1. Do a superficial scan of the code looking at names of classes, functions, variables, and speculate where the modification that I have to make will go. Chances are you don't need to understand the entire system to make your change. 2. Build some hypotheses about how the system works and use print statements or some other debugging technique to run the program and see if you get the result you expect. 3. Insert your code into a separate class and function and see if you can inject a call to your new code from the existing code so that it now works with the new functionality. If you have to understand the details of some code, one approach is to try to summarize blocks of code with a single comment to wrap your mind around it. Asim -- http://mail.python.org/mailman/listinfo/python-list
