[PyKDE] Custom import statements

Ken Godee ken at perfect-image.com
Thu Jan 23 15:54:01 GMT 2003


> My question: how can I make pyuic put a certain "import" statement at the 
> beginning of a generated py-file? I'm working on a graphical frontend for a 
> device connected to a VME bus. To be quick, I write most of the code into qt 
> designer, so that pyuic puts it in its py-file. To accessing the device I 
> need a "import VME" statement at the beginning of the py-file. How do I 
> achieve that pyuic puts it there for me. For now, I have to edit the py-file 
> after every execution of pyuic.

This feature was made available in one of the newer
versions. What version are you using?
It is available in the newest snapshot and probally somewhere
along the way. Check version changes or download the
newest snapshot.  You can add your statements in the
form comments section designer, like this....

Python: import VME

It's in the docs.




More information about the PyQt mailing list