Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #59657
| Date | 2013-11-16 22:10 +0100 |
|---|---|
| From | Luuk <luuk@invalid.lan> |
| 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> |
| Message-ID | <3j3lla-1eh.ln1@luuk.invalid.lan> (permalink) |
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 | Next — Previous in thread | Find similar | Unroll 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