Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59657

Re: Beginner python 3 unicode question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Date Sat, 16 Nov 2013 22:10:32 +0100
From Luuk <luuk@invalid.lan>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version 1.0
Newsgroups comp.lang.python
Subject Re: Beginner python 3 unicode question
References <mailman.2730.1384629174.18130.python-list@python.org> <o1ukla-h8g.ln1@luuk.invalid.lan> <mailman.2734.1384635478.18130.python-list@python.org>
In-Reply-To <mailman.2734.1384635478.18130.python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <3j3lla-1eh.ln1@luuk.invalid.lan> (permalink)
Lines 27
NNTP-Posting-Host 2001:980:9089:1:440b:8f32:5d9b:8bb5
X-Trace 1384636801 news.xs4all.nl 15891 [2001:980:9089:1:440b:8f32:5d9b:8bb5]:57566
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:59657

Show key headers only | View raw


On 16-11-2013 21:57, Laszlo Nagy wrote:
>
>> the error is in one of the lines you did not copy here....
>>
>> because this works without problems:
>> <<BEGIN-of script>>
>> #!/usr/bin/python
>>
> Most probably, your /usr/bin/python program is python version 2, and not
> python version 3
>
> Try the same program with /usr/bin/python3. And also try the interactive
> mode with the same program and I think you will see the same phenomenon.
>

adding some '()' helped:
<<BEGIN-of script>>
#!/usr/bin/python3

import uuid
import base64
print (base64.b32encode(uuid.uuid1().bytes)[:-6].lower())
<<END-of script>>

~/temp> python3 --version
Python 3.3.0

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Beginner python 3 unicode question Laszlo Nagy <gandalf@shopzeus.com> - 2013-11-16 20:12 +0100
  Re: Beginner python 3 unicode question Luuk <luuk@invalid.lan> - 2013-11-16 20:35 +0100
    Re: Beginner python 3 unicode question Laszlo Nagy <gandalf@shopzeus.com> - 2013-11-16 21:57 +0100
      Re: Beginner python 3 unicode question Luuk <luuk@invalid.lan> - 2013-11-16 22:10 +0100

csiph-web