Search in list of dictionaries

2009-02-19 Thread Alex Gusarov
Hello everybody! I've a list of dictionaries with 'shorcut' and 'command' keys. When user types a word program must search this list for a typed shortcut and then run linked command. What I've wrote: for cmd in self.commands: if cmd['shortcut'] == input: os.po

Re: Search in list of dictionaries

2009-02-19 Thread Alex Gusarov
Thanks! This example is quite simple and works exactly the way I wanted. On Thu, Feb 19, 2009 at 11:39 PM, MRAB wrote: > Alex Gusarov wrote: > >> Hello everybody! >> >> I've a list of dictionaries with 'shorcut' and 'command' keys. When user &g

How to get all variables of some module in that module

2008-10-20 Thread Alex Gusarov
7;title', Unicode(50)), Column('description', Unicode(1000)), Column('color', Unicode(6)), ) tables_collection = {} Here I want to get all Table instances of current module and put them into dictionary by names, but I don't know how I can get all variables of curre

Re: How to get all variables of some module in that module

2008-10-21 Thread Alex Gusarov
Steven, Peter, thanks a lot from a Python newcomer. Problem solved with you help. Still, Python community is best I ever met :) -- Best regards, Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: PYQT- How to prevent a dialog being resized in qtdesigner

2008-05-25 Thread Alex Gusarov
There is no simple way to do it. But it seems to be a meaningless - resizing dialog in Designer is equal to changing its geometry. On Mon, May 26, 2008 at 9:30 AM, bbmerong <[EMAIL PROTECTED]> wrote: > I have a question about qtdesigner. > > I'd like to know how to prevent a dialog being resized

Re: Overloading virtual method of widget without inheriting (PyQt)

2008-05-28 Thread Alex Gusarov
al/slots in PyQT: Thanks, but actually, paintCell is not a signal, it's simply a virtual method of caledarwidget. -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usages in Python

2008-05-28 Thread Alex Gusarov
> class Event(object): > > Always subclass object, unless you have a very compelling reason not to, > or you are subclassing something else. > I've thought that if I write class Event: pass , it'll be subclass of object too, I was wrong? -- Best rega

Re: Struct usages in Python

2008-05-29 Thread Alex Gusarov
> classes are gone for good. > Thanks, I don't knew it before and it's a sensitive information for me. -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usages in Python

2008-05-29 Thread Alex Gusarov
> classes are gone for good. > Thanks, I don't knew it before and it's a sensitive information for me. -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Re: Struct usages in Python

2008-05-29 Thread Alex Gusarov
e > >classes are gone for good. Thanks, I don't knew it before and it's a sensitive information for me. -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Unit tests?

2008-05-29 Thread Alex Gusarov
nformation, but 'cause I don't know anything about subject, I don't know where to start from. Thanks -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Re: Unit tests?

2008-05-29 Thread Alex Gusarov
Thx, it's quite enough for a start. Yes, googling is almost ultimate answer for such questions, sorry for uneasiness. > Try googling "python unit test". I did it, and amongst the first hits > were: > >* docs.python.org/lib/module-unittest.html > >* http://www.diveintopython.org/unit_testi

py2exe & application add-ons

2008-06-19 Thread Alex Gusarov
will I need Python installation on client machine? Maybe other ways exist for such tasks? -- Thx, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe & application add-ons

2008-06-20 Thread Alex Gusarov
Thanks everybody, yes, I use 'exec' for files. And "freeze" modules - thanks too, I almost forgot this opportunity. -- Best regards, Alex Gusarov -- http://mail.python.org/mailman/listinfo/python-list