Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33873
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <vincent.vandevyvre@swing.be> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'importerror:': 0.05; 'url:launchpad': 0.05; 'exit': 0.07; 'try:': 0.07; 'urllib2': 0.07; 'valueerror:': 0.07; '(self):': 0.09; 'exception,': 0.09; 'grid': 0.09; 'def': 0.10; 'subject:error': 0.11; 'finished': 0.15; 'from:addr:swing.be': 0.16; 'from:addr:vincent.vandevyvre': 0.16; 'from:name:vincent vande vyvre': 0.16; 'message-id:@swing.be': 0.16; 'oqapy': 0.16; 'paqager': 0.16; 'received:mobistar.be': 0.16; 'url:oqapy': 0.16; 'url:paqager': 0.16; 'url:qarte': 0.16; 'v.v.': 0.16; '\xe9crit': 0.16; 'fix': 0.17; 'app': 0.19; 'module': 0.19; 'skip:" 40': 0.20; 'import': 0.21; 'script': 0.24; 'pass': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '(most': 0.27; 'run': 0.28; 'skip:q 20': 0.29; 'date:': 0.29; 'skip:_ 10': 0.29; 'class': 0.29; 'install': 0.29; 'error': 0.30; 'code': 0.31; 'file': 0.32; 'skip:s 30': 0.33; 'traceback': 0.33; 'to:addr :python-list': 0.33; 'code:': 0.33; 'continue': 0.35; 'except': 0.36; 'skip:g 30': 0.36; 'subject:: ': 0.38; 'skip:l 20': 0.38; 'url:en': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'skip:u 10': 0.60; 'received:80.12': 0.65 |
| Date | Sat, 24 Nov 2012 11:33:28 +0100 |
| From | Vincent Vande Vyvre <vincent.vandevyvre@swing.be> |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: UI error for pycharm |
| References | <0adb87de-e60b-4371-a6ff-e27c5b85a476@googlegroups.com> |
| In-Reply-To | <0adb87de-e60b-4371-a6ff-e27c5b85a476@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.249.1353753665.29569.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1353753665 news.xs4all.nl 6872 [2001:888:2000:d::a6]:53933 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33873 |
Show key headers only | View raw
Le 24/11/12 11:20, bakie a écrit :
> when I run py script in pycharm for UI
>
>
> Code:
> import from PySide.QtCore import * from PySide.QtGui import * import urllib2 class Form(QDialog): def __init__(self, parent=None): super(Form, self).__init__(parent) date = self.getdata() rates = sorted(self.rates.keys()) dateLabel = QLabel(date) self.fromComboBox = QComboBox() self.fromComboBox.addItems(rates) self.fromSpinBox = QDoubleSpinBox() self.fromSpinBox.setRange(0.01, 10000000.00) self.fromSpinBox.setValue(1.00) self.toComboBox = QComboBox() self.toComboBox.addItems(rates) self.toLabel = QLabel("1.00") grid = QGridLayout() grid.addWidget(dateLabel, 0, 0) grid.addWidget(self.fromComboBox, 1, 0) grid.addWidget(self.fromSpinBox, 1, 1) grid.addWidget(self.toComboBox, 2, 0) grid.addWidget(self.toLabel, 2, 1) self.setLayout(grid) self.connect(self.fromComboBox, SIGNAL("currentIndexChanged(int)"), self.updateUi) self.connect(self.toComboBox, SIGNAL("currentIndexChanged(int)"), self.updateUi) self.connect(self.fromSpinBox, SIGNAL("valueChanged(double)"), self.updateUi) def
> updateUi
> (self): to = self.toComboBox.currentText() from_ = self.fromComboBox.currentText() amount = (self.rates[from_] / self.rates[to]) * self.fromSpinBox.value() self.toLabel.setText("%0.2f" % amount) def getdata(self): self.rates = {} try: date = "Unknown" fh = urllib2.urlopen("http://www.bankofcanada.ca/en/markets/csv/exchange_eng.csv") for line in fh: line = line.rstrip() if not line or line.startswith(("#", "Closing")): continue fields = line.split(",") if line.startswith("Date "): date = fields[-1] else: try: value = float(fields[-1]) self.rates[fields[0]] = value except ValueError: pass return "Exchange rates date: " + date except Exception, e: return "Failued to download:\n%s" % e app = QApplication(sys.argv) form = Form() form.show() app.exec_()
>
>
> I had this error , how to fix them ?
>
> Code:
> C:\Python27\python.exe "C:/Users/denial/PycharmProjects/currency project/alarm.py"
> Traceback (most recent call last):
> File "C:/Users/denial/PycharmProjects/currency project/alarm.py", line 2, in <module>
> from PySide.QtCore import *
> ImportError: No module named PySide.QtCore
>
> Process finished with exit code 1
Install PySide.
--
Vincent V.V.
Oqapy <https://launchpad.net/oqapy> . Qarte
<https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
UI error for pycharm bakie <sagittarus999@gmail.com> - 2012-11-24 02:20 -0800 Re: UI error for pycharm Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2012-11-24 11:33 +0100 Re: UI error for pycharm bakie <sagittarus999@gmail.com> - 2012-11-24 02:57 -0800 Re: UI error for pycharm bakie <sagittarus999@gmail.com> - 2012-11-24 02:58 -0800 Re: UI error for pycharm bakie <sagittarus999@gmail.com> - 2012-11-24 03:29 -0800
csiph-web