Agreed...  But we are supporting a large body of code that already has many "import qt" and "from qt import *" statements throughout the code...  Having a more standardized way of handling this (rather than providing a 'qt.py' file for every project that uses pyqt) would be much preferrable... 

BTW.  I DO like the new namespaces in Qt4..  It makes things much nicer for programming and using pyqt.  However, they also are providing backwards compatibility header files in most cases..

On a side note:  I'm really pleased with the roadmap for Qtv4 support.   This is really good news.

Joe


Truls A. Tangstad wrote:
On Thu, Feb 17, 2005 at 08:05:49AM -0800, Longson, Joe wrote:
  
The separate Qt v4 libraries will be wrapped as separate Python modules.
The module names will be the same as the corresponding library (eg.
QtCore, QtGui) and be grouped as a single Python package called PyQt4. The
suggested programming style for new applications would then be:

import sys
      
>from PyQt4 import QtGui
    
app = QtGui.QApplication(sys.argv)
      

  
Would we be required to use the from PyQt4 import QtGui?

The existing namespace allows us to do "import qt" Could a similar 
facility be provided?  (for maintaining more code compatibility)

e.g.

In qt.py --------------

from PyQt4 import *
from PyQt4.QtGui import *
    

Wouldn't that be best left to individual programmers? If you need such
a namespace, just provide it as part of your application.

  

-- 
Joe Longson
Senior Software Engineer
(818) 460-8384 (work)
[EMAIL PROTECTED]
*o* Walt Disney Feature Animation
_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to