Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70794
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <square.steve@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'resulting': 0.04; 'dev': 0.07; 'skip:" 60': 0.07; 'steve': 0.09; '(instead': 0.09; 'executable': 0.09; 'loaded,': 0.09; 'pep': 0.09; 'subject:using': 0.09; 'python': 0.11; 'posted': 0.15; 'windows': 0.15; '"python': 0.16; "'arguments'": 0.16; "'build'": 0.16; '(it': 0.16; '->': 0.16; 'eclipse': 0.16; 'fabio': 0.16; 'fabio,': 0.16; 'icon': 0.16; 'imports': 0.16; 'subject:Slightly': 0.16; 'substituting': 0.16; 'tab': 0.16; 'to:name:python list': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'trying': 0.19; 'properly': 0.19; 'import': 0.22; 'email addr:gmail.com>': 0.22; 'installation': 0.23; 'header:User- Agent:1': 0.23; 'error': 0.23; 'driver': 0.24; 'cheers,': 0.24; 'environment': 0.24; "i've": 0.25; 'source': 0.25; 'posts': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'external': 0.29; 'am,': 0.29; "doesn't": 0.30; 'needed.': 0.30; 'relative': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'work.': 0.31; 'getting': 0.31; "skip:' 10": 0.31; 'quotes': 0.31; 'workaround': 0.31; 'file': 0.32; 'class': 0.32; 'run': 0.32; 'worked': 0.33; 'url:python': 0.33; '(most': 0.33; 'ago': 0.33; 'guess': 0.33; 'subject:from': 0.34; 'problem': 0.35; 'created': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; "i'll": 0.36; 'url:org': 0.36; 'should': 0.36; 'so,': 0.37; 'list.': 0.37; 'message-id:@gmail.com': 0.38; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'track': 0.38; 'recent': 0.39; '(from': 0.39; 'morning': 0.39; 'structure': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'skip:p 20': 0.39; 'url:mail': 0.40; 'how': 0.40; 'read': 0.60; 'new': 0.61; '8bit%:10': 0.64; 'more': 0.64; '30,': 0.65; 'skip:f 50': 0.65; 'details': 0.65; 'within': 0.65; 'header:Reply-To:1': 0.67; 'brain': 0.68; 'reply-to:no real name:2**0': 0.71; 'overcome': 0.74; 'click': 0.77; 'reply-to:addr:gmail.com': 0.80; 'as:': 0.81; "'new'": 0.84; '(probably': 0.84; 'here)': 0.84; 'simmons': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=yeEWFwefw9AXZz2WQYP/YJJmTpD6Dl/XjVtwvBBS9Ls=; b=dR0FK5QLSETuK5ZJ6OfrJISUL2cLRObDCx9jLNJF95VEK/gXHLf0z5mlXONjqY2XpO 1TmyVpVnO6SyZBoSaR1oc/Xw/OTdq7Lvl78Gph1/t1uDkd0gXxZWzdsVVb6V4WRS+ZKp bbkX1D6KRQEdUwxK8gbQpDWa4XN5czp3t3YCa9RTS6MjHtAI7mS0cwAPn9I9BuP4W/SB Cs5LkSwQMXZ4h6/OC55DRwWxpXvq9npCQUCHGyIbDoxVebfFWTu8rg6SZXVqT8Up8zZq 2FYrmO78FJNV1VhX86Q4ORu6XayqdoTxHxcdkzYcbhRibdqa65wpkn1orwQ3PPnJtTu6 hMgg== |
| X-Received | by 10.194.171.198 with SMTP id aw6mr6414715wjc.23.1398905368420; Wed, 30 Apr 2014 17:49:28 -0700 (PDT) |
| Date | Thu, 01 May 2014 01:49:25 +0100 |
| From | Steve Simmons <square.steve@gmail.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
| MIME-Version | 1.0 |
| To | python list <python-list@python.org> |
| Subject | Re: Slightly OT - using PyUIC from Eclipse |
| References | <5360E0FC.70802@gmail.com> <CANXBEFrqndqCeT-9Hgqz7jRCZcmp8nz4VE+ebf-BKsYr54qQqQ@mail.gmail.com> |
| In-Reply-To | <CANXBEFrqndqCeT-9Hgqz7jRCZcmp8nz4VE+ebf-BKsYr54qQqQ@mail.gmail.com> |
| Content-Type | text/html; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | square.steve@gmail.com |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9619.1398905375.18130.python-list@python.org> (permalink) |
| Lines | 131 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1398905375 news.xs4all.nl 2940 [2001:888:2000:d::a6]:50492 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:70794 |
Show key headers only | View raw
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 30/04/2014 23:49, Fabio Zadrozny
wrote:<br>
</div>
<blockquote
cite="mid:CANXBEFrqndqCeT-9Hgqz7jRCZcmp8nz4VE+ebf-BKsYr54qQqQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 30, 2014 at 8:39 AM,
Steve Simmons <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:square.steve@gmail.com" target="_blank">square.steve@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">I'm trying to set up a
new dev environment using Windows 7; Eclipse (Kepler);
Python 3.3; PyDev and PyQt 5 and I've hit an issue getting
PyUIC to generate a python Qt class from within Eclipse.<br>
<br>
I'm using the following setup process (from Google Groups)
modified to match my PyQt5 configuration:<br>
<br>
1. Click Run -> External Tools -> External Tools
Configurations ...<br>
2. In the resulting dialog, click 'New' icon in the top
left<br>
3. Under 'Name' put 'PyUIC'<br>
4. Under 'Location' enter 'C:\Program
Files\Python\2.5\Python.exe' or<br>
the path to your Python executable (probably
C:\Python25\Python.exe)<br>
5. Under 'Arguments' enter '"C:\Program
Files\Python\2.5\Lib\site-<br>
packages\PyQt4\uic\pyuic.py" "${resource_loc}"'
substituting the path<br>
to your PyQt4 installation - be sure also to include the
double quotes<br>
6. Change to the 'Common' tab and check 'File' under
'Standard Input/<br>
Output' and enter '${resource_loc}.py'<br>
7. Change to the 'Build' tab and uncheck 'Build before
launch'<br>
8. Change to the 'Refresh' tab and check 'Refresh
resources upon<br>
completion'<br>
9. Click 'Apply' then 'Run'<br>
<br>
and I'm getting the following traceback:<br>
<br>
Traceback (most recent call last):<br>
File "D:\Development\Python33\Lib\site-packages\PyQt5\uic\pyuic.py",<br>
line 28, in <module><br>
from .driver import Driver<br>
SystemError: Parent module '' not loaded, cannot perform
relative import<br>
<br>
I tried this on Qt4 a week or so ago and it worked OK but
Qt5 is giving me an error message, so I guess I've either
mis-transcribed or there's a difference in the directory
structure betwee PyQt4 & PyQt5.<br>
<br>
I'm more interested to learn how to read the traceback
(insightfully) and track it to the source of the problem,
although it would be good to have it working too!!<span
class=""><font color="#888888"><br>
<br>
Steve Simmons<br>
</font></span><br>
PS Also posted to PyQT list.<br>
-- <br>
<a moz-do-not-send="true"
href="https://mail.python.org/mailman/listinfo/python-list"
target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra"><br>
The problem is that a main module cannot perform relative
imports on Python. To overcome that limitation, Python created
a workaround to execute a module with:<br>
<br>
python -m '<a moz-do-not-send="true" href="http://module.name">module.name</a>'<br>
<br>
</div>
<div class="gmail_extra">So, If you execute Python as:<br>
<br>
</div>
<div class="gmail_extra">python -m PyQt5.uic.pyuic<br>
<br>
</div>
<div class="gmail_extra">
(instead of "python C:\Program
Files\Python\2.5\Lib\site-packages\PyQt5\uic\pyuic.py")<br>
<br>
</div>
<div class="gmail_extra">it should work.<br>
<br>
</div>
<div class="gmail_extra">If you want, you can read an answer on
<a moz-do-not-send="true"
href="http://stackoverflow.com/questions/14132789/python-relative-imports-for-the-billionth-time">http://stackoverflow.com/questions/14132789/python-relative-imports-for-the-billionth-time</a>
for more details on why it doesn't work and the other way
does...<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Cheers,<br>
<br>
Fabio<br>
</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
Thanks Fabio, just what I needed. I've started to read the SO posts
and relevant PEP but my brain is fried (it is 01:45 here) so I'll
have a better read in the morning and 'play' with some modules so
that I properly understand what's going on.<br>
<br>
Regards<br>
<br>
Steve <br>
</body>
</html>
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Slightly OT - using PyUIC from Eclipse Steve Simmons <square.steve@gmail.com> - 2014-05-01 01:49 +0100
Re: Slightly OT - using PyUIC from Eclipse Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-01 01:50 +0000
Re: Slightly OT - using PyUIC from Eclipse Mark H Harris <harrismh777@gmail.com> - 2014-04-30 22:03 -0500
Re: Slightly OT - using PyUIC from Eclipse Steve Simmons <square.steve@gmail.com> - 2014-05-01 20:18 +0100
csiph-web