On Apr 18, 2010, at 11:53 AM, Steve Borho wrote:

> On Sat, Apr 17, 2010 at 9:54 PM, Yuya Nishihara <y...@tcha.org> wrote:
>> Hi,
>> 
>> Laurent Dufrechou wrote:
>>> User who use source install will not be bothered by using uic file or not.
>>> Since each time you generate a new ui file, you should regenerate the .py
>>> file.
>>> And commit _both_ of them.
>> 
>> Or introduce a trick to load ui file dynamically:
>> 
>>    try:
>>        from ui_foo import Ui_Foo
>>    except ImportError:
>>        from PyQt4 import uic
>>        Ui_Foo = uic.loadUiType(os.path.join(os.path.dirname(__file__)), 
>> 'foo.ui'))[0]
>> 
>> It can ease the development process, since we don't need to type
>> `make ui` or `python setup.py build_ui` everytime you change ui file.
> 
> I like this idea; since we never save the file it will be regenerated
> each time.  

just to clarify, uic.loadUiType does not generate intermediate py or pyc files, 
it simply loads the ui file directly.   in my experience, this is pretty 
standard practice for those using newer versions of PyQt that support this 
workflow.

> We'll presumably compile the UIs for the installers, so
> end users will never see this overhead.  

before giving yourself extra work to do, it might be worthwhile to determine if 
there is any noticeable load time savings by pre-creating py files from ui 
files vs using loadUiType.  perhaps with many large UIs it would be noticeable. 
 

-chad




------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to