I'm having a strange problem with the pyqt-tools in the latest Debian
packages. When I run
$ pyuic colortool.ui > colortool.py
Extracting init()
Extracting loadSettings()
Extracting saveSettings()
....
it produces 'colortool.py' with python function headers, but the body of the
functions are still in C. There are no error messages, just the normal log
of "extracting" functions.
The file colortool.ui is the tutorial example from the Qt Designer manual,
and it works correctly when compiled in C. The versions on all the relevant
packages seem to be correct:
-> pyuic is from package pyqt-tools 3.8-2.1 This package depends on:
libc6 (>= 2.3.2-1), libgcc1 (>= 1:3.3.1-1), libqt3c102-mt (>= 3:3.2.1),
libstdc++5 (>= 1:3.3.1-1), xlibs (>> 4.1.0)
-> Current versions shown by dpkg are:
libc6 2.3.2-9, libgcc1 1:3.3.2-1, libqt3c102-mt 3:3.2.1-6, libstdc++5
1:3.3.2-1, xlibs 4.2.1-12.1
-> designer is from package qt3-designer 3:3.2.1-6
$ pyuic -version
Python User Interface Compiler 3.8 for Qt version 3.2.1
I have used Python and Qt in Redhat 9, after great effort to correct
mismatched versions in their packaging. That is the only reason I suspected
packaging problems here, but so far I've had much better experience with
Debian's packages.
This is very frustrating. I've committed to a project using Qt and Python,
and I'm totally dependent on pyuic. Any suggestions would be much
appreciated.
-- Dave 3 1898
On Tuesday 04 November 2003 6:45 pm, Dave wrote: I'm having a strange problem with the pyqt-tools in the latest Debian packages. When I run $ pyuic colortool.ui > colortool.py Extracting init() Extracting loadSettings() Extracting saveSettings() ... it produces 'colortool.py' with python function headers, but the body of the functions are still in C. There are no error messages, just the normal log of "extracting" functions.
The file colortool.ui is the tutorial example from the Qt Designer manual, and it works correctly when compiled in C. The versions on all the relevant packages seem to be correct:
-> pyuic is from package pyqt-tools 3.8-2.1 This package depends on: libc6 (>= 2.3.2-1), libgcc1 (>= 1:3.3.1-1), libqt3c102-mt (>= 3:3.2.1), libstdc++5 (>= 1:3.3.1-1), xlibs (>> 4.1.0) -> Current versions shown by dpkg are: libc6 2.3.2-9, libgcc1 1:3.3.2-1, libqt3c102-mt 3:3.2.1-6, libstdc++5 1:3.3.2-1, xlibs 4.2.1-12.1 -> designer is from package qt3-designer 3:3.2.1-6
$ pyuic -version Python User Interface Compiler 3.8 for Qt version 3.2.1
I have used Python and Qt in Redhat 9, after great effort to correct mismatched versions in their packaging. That is the only reason I suspected packaging problems here, but so far I've had much better experience with Debian's packages. This is very frustrating. I've committed to a project using Qt and Python, and I'm totally dependent on pyuic. Any suggestions would be much appreciated.
That's because the form includes embedded C++ code. There is nothing to stop
you embedding Python code (just ignore the C++ style function definition) and
it will be properly extracted.
What pyuic doesn't do is look at the embedded code and try to work out if it
is Python or something else.
Phil
"Phil Thompson" <ph**@riverbankcomputing.co.uk> wrote in message
news:ma************************************@python .org... On Tuesday 04 November 2003 6:45 pm, Dave wrote: I'm having a strange problem with the pyqt-tools in the latest Debian packages. When I run $ pyuic colortool.ui > colortool.py Extracting init() Extracting loadSettings() Extracting saveSettings() ... it produces 'colortool.py' with python function headers, but the body of the functions are still in C. There are no error messages, just the
normal log of "extracting" functions.
[...] That's because the form includes embedded C++ code. There is nothing to
stop you embedding Python code (just ignore the C++ style function definition)
and it will be properly extracted.
What pyuic doesn't do is look at the embedded code and try to work out if
it is Python or something else.
OK, I can ignore the C++ embedded code, but it seems that Python can't.
Python 2.3.2 (#2, Oct 6 2003, 08:02:06)
[GCC 3.3.2 20030908 (Debian prerelease)] on linux2 from colortool import MainForm
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "colortool.py", line 225
QSettings settings;
^
SyntaxError: invalid syntax
I must be missing a switch or something.
-- Dave
"Phil Thompson" <ph**@riverbankcomputing.co.uk> wrote in message
news:ma************************************@python .org... On Tuesday 04 November 2003 6:45 pm, Dave wrote: I'm having a strange problem with the pyqt-tools in the latest Debian packages. When I run $ pyuic colortool.ui > colortool.py Extracting init() Extracting loadSettings() Extracting saveSettings() ... it produces 'colortool.py' with python function headers, but the body of the functions are still in C. There are no error messages, just the
normal log of "extracting" functions.
[...] That's because the form includes embedded C++ code. There is nothing to
stop you embedding Python code (just ignore the C++ style function definition)
and it will be properly extracted.
What pyuic doesn't do is look at the embedded code and try to work out if
it is Python or something else.
Oops. Please ignore my previous post. I misunderstood what Phil was
saying. I see now what to do. Just write Python code in the body of the
C++ stub functions ( leaving the outer { } in place ) , and pyuic will copy
that code verbatim into the body of the translated Python functions.
Excellent.
Many thanks.
-- Dave This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stelian Iancu |
last post by:
Hello all!
I am trying to install eric3, the Python IDE. I've downloaded and installed
successfully sip-3.8, QScintilla-1.2 and PyQT-3.8. However, when I try to
install eric, I get the following...
|
by: Vamsi Mudrageda |
last post by:
I am kind of new to Python, and after trying and using wxPython, I found
it kind of lacking in easy-to-read documentation, speed at loading, and
GUI response-time.
So I am looking for an another...
|
by: Markus Zimmermann |
last post by:
Hi,
does anybody of you know, where to get a current snapshot of PyQt and
PyKDE ?
Thanx, Markus
|
by: Paul Drummond |
last post by:
Hi guys, newbie here - is it ok to post pyQt questions here?
I know there is a mailing list for pyKDE but I can't find a specific pyQt
newsgroup.
Cheers,
Paul Drummond
|
by: Erwan Adam |
last post by:
Hi all,
I try to introduce tooltips in my application written
in PyQt (more precisly, in the menubar of my application)
but I can't find a way to get the QRect instance
associated to a QMenuBar...
|
by: Fabio |
last post by:
Hi all,
I'm about to write an application, and I'd like to use PyQt, but before
choosing this toolkit I would like to clarify some particular licensing
issues; if some user has already touched...
|
by: Nanoscalesoft |
last post by:
hello all,
I am planning to start coding a nanoscale design software in
python with QT interface.I have to do this in windows or linux.Intially
windows would be fine.
I have struggled almost full...
|
by: Fabrice H |
last post by:
hello
I have QT 3.1.1 educational on my computer (Win XP)
I tried to install several version of pyQt (PyQt edu 3.13 Edu, PyQt
edu 3.6, PyQT non-commercial 4.13, but I still can't import qt module....
|
by: Eric Jardim |
last post by:
Hi,
Is there any site that gather all the documentation about PyQt?
The docs of the Riverbank site is poor, and I have found separate
tutorials on the net.
I know that the Kompany have made...
|
by: eholbroo |
last post by:
I've narrowed down my toolkit selection for my project to wxPython and
pyQt, and now i'd like to hear any opinions, war stories, peeves, etc,
about them, particularly from anyone who's used...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |