Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46196
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <kwpolska@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'binary': 0.07; 'ascii': 0.09; 'iterate': 0.09; 'python:': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; "'q'": 0.16; 'characters:': 0.16; 'gpg': 0.16; 'hex': 0.16; 'subject:Problems': 0.16; 'values?': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'first.': 0.19; 'cc:addr:python.org': 0.22; 'unicode': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'that.': 0.31; 'too.': 0.31; 'letter.': 0.31; 'run': 0.32; 'text': 0.33; 'url:python': 0.33; 'subject:with': 0.35; 'display': 0.35; 'skip:s 30': 0.35; 'convert': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'turn': 0.37; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'new': 0.61; 'from:charset:utf-8': 0.61; 'to:addr:gmail.com': 0.65; 'characters,': 0.84; 'url:tk': 0.95; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=JOqUbxfw51rONqlu5scLfLg/yE95+P6O23qzRdMnJbc=; b=IC2/poXiB/KQ3YC6VidmZn97lMu1eS1MdTSgbADgVz9MUgrU6Ns96YJ6JeThXU1RhR bALIecShz0CPY7lJE7gkduPGPyN0F3hzYp+EIpANMx0SsLC6UVB5uu+x8ec5uVsIE/pz ozBNMqrrYMFasIXdxBuXu0MMsoZysbB9DJ+V5kbyoFmrphuar6kT19lXmpd/BcJt81K4 OtwDO2jpedvtQC6Edq4OzHm25ZHbCRV9qu4VBVFmb/l3CExaXgfolfE/HvcFg58asUK7 sSNtEoPXA7aoAXI49RIKJ9kI4zU1plsjusE8b6euY0/htrqZccldjGdYUdzi0hnd0Px+ zLBA== |
| X-Received | by 10.42.64.135 with SMTP id g7mr17015248ici.37.1369660244491; Mon, 27 May 2013 06:10:44 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <8d8fd7fc-2509-457e-a4c9-0a1ac1f65c02@googlegroups.com> |
| References | <8d8fd7fc-2509-457e-a4c9-0a1ac1f65c02@googlegroups.com> |
| From | Chris “Kwpolska” Warrick <kwpolska@gmail.com> |
| Date | Mon, 27 May 2013 15:10:24 +0200 |
| Subject | Re: Problems with python and pyQT |
| To | silusilusilu@gmail.com |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | python-list@python.org |
| 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.2249.1369660253.3114.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369660253 news.xs4all.nl 15894 [2001:888:2000:d::a6]:42145 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46196 |
Show key headers only | View raw
On Mon, May 27, 2013 at 11:26 AM, <silusilusilu@gmail.com> wrote:
> Hi,
> i'm new with python: so excuse me for my questions....
> i have this code:
>
> def updateLog(self, text):
> self.ui.logTextEdit.moveCursor(QTextCursor.End)
> self.ui.logTextEdit.insertHtml("<font color=\"Black\">"+text)
> self.ui.logTextEdit.moveCursor(QTextCursor.End)
>
> logTextEdit is a QTextEdit object.With this code,i can display only ascii characters: how can i diplay text as hex and binary values?
> Thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
You would need to convert them to strings first. You may want bin()
and hex() for that. And if you want to convert 'q' to 0x71,
hex(ord("q")). And if you want to turn 'hello' into 0x68656c6c6f, you
would need to iterate over 'hello' and run the above function over
every letter.
Also, you are able to display Unicode characters, too.
--
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail | always bottom-post
http://asciiribbon.org | http://caliburn.nl/topposting.html
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Problems with python and pyQT silusilusilu@gmail.com - 2013-05-27 02:26 -0700
Re: Problems with python and pyQT Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-05-27 15:10 +0200
Re: Problems with python and pyQT silusilusilu@gmail.com - 2013-05-28 02:41 -0700
Re: Problems with python and pyQT Dave Angel <davea@davea.name> - 2013-05-28 06:59 -0400
csiph-web