On Sun, Nov 30, 2014 at 7:07 PM, balaji marisetti
balajimarise...@gmail.com wrote:
Hi,
Hi. This list is for the development *of* Python, not development
*with* Python, so I'm sending this reply also to
python-list@python.org where it can be better handled. You'll probably
want to subscribe here:
The default encoding is UTF-8. It works if I do:
with open(filename, errors=ignore) as f:
So I think Python2, by default, ignores all errors whereas Python3 doesn't
On 1 December 2014 at 01:49, Chris Angelico ros...@gmail.com wrote:
On Sun, Nov 30, 2014 at 7:07 PM, balaji marisetti
On 11/30/2014 09:19 PM, balaji marisetti wrote:
The default encoding is UTF-8. It works if I do:
with open(filename, errors=ignore) as f:
So I think Python2, by default, ignores all errors whereas Python3 doesn't
Do you mean that the file is supposed to be utf-8 but isn't?
Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit :
On 09/04/2014 09:07, wxjmfa...@gmail.com wrote:
Well, there is a (serious) problem somewhere...
jmf
Look in a mirror and you'll see it as it'll be staring you in the face.
--
My fellow Pythonistas,
On 2014-04-10 04:47, wxjmfa...@gmail.com wrote:
Le mercredi 9 avril 2014 10:53:36 UTC+2, Mark Lawrence a écrit :
On 09/04/2014 09:07, wxjmfa...@gmail.com wrote:
Well, there is a (serious) problem somewhere...
jmf
Look in a mirror and you'll see it as it'll be staring you in the
Well, there is a (serious) problem somewhere...
jmf
--
https://mail.python.org/mailman/listinfo/python-list
On 09/04/2014 09:07, wxjmfa...@gmail.com wrote:
Well, there is a (serious) problem somewhere...
jmf
Look in a mirror and you'll see it as it'll be staring you in the face.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark
On Wed, 9 Apr 2014 01:07:20 -0700 (PDT), wxjmfa...@gmail.com wrote:
Well, there is a (serious) problem somewhere...
As there is with pandas and infertility.
--
Terms and conditions apply.
Steve Hayes
hayesm...@hotmail.com
--
https://mail.python.org/mailman/listinfo/python-list
On 18 Nov 2013 22:36, Robin Becker ro...@reportlab.com wrote:
On 18/11/2013 11:47, Robin Becker wrote:
...
#c:\python33\lib\site-packages\sitecustomize.py
import sys, codecs
sys.stdout = codecs.getwriter(utf-8)(sys.stdout.detach())
sys.stderr =
Why do you need to force the UTF-8 encoding? Your locale is not
correctly configured?
It's better to set PYTHONIOENCODING rather than replacing
sys.stdout/stderr at runtime.
There is an open issue to add a TextIOWrapper.set_encoding() method:
http://bugs.python.org/issue15216
Victor
--
On Mon, Nov 18, 2013, at 7:33, Robin Becker wrote:
UTF-8 stuff
This doesn't really solve the issue I was referring to, which is that
windows _console_ (i.e. not redirected file or pipe) I/O can only
support unicode via wide character (UTF-16) I/O with a special function,
not via using byte-based
From: random...@fastmail.us random...@fastmail.us
On Mon, Nov 18, 2013, at 7:33, Robin Becker wrote:
UTF-8 stuff
This doesn't really solve the issue I was referring to, which is that
windows _console_ (i.e. not redirected file or pipe) I/O can only
support unicode via wide character
Example interactive:
$ python3
Python 3.3.1 (default, Sep 25 2013, 19:29:01)
[GCC 4.7.3] on linux
Type help, copyright, credits or license for more information.
import uuid
import base64
base64.b32encode(uuid.uuid1().bytes)[:-6].lower()
b'zsz653co6ii6hgjejqhw42ncgy'
But when I put the same
On 16-11-2013 20:12, Laszlo Nagy wrote:
Example interactive:
$ python3
Python 3.3.1 (default, Sep 25 2013, 19:29:01)
[GCC 4.7.3] on linux
Type help, copyright, credits or license for more information.
import uuid
import base64
base64.b32encode(uuid.uuid1().bytes)[:-6].lower()
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
Why it is behaving differently on the command line? What should I do
to fix this?
I was experimenting with this a bit more and found some more confusing
things. Can somebody please enlight me?
Here is a test function:
def password_hash(self,password):
public =
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
So is the default utf-8 or not? Should the documentation be updated?
Or do we have a bug in the interactive shell?
It was my fault, sorry. The other program used os.system at some places,
and it accidentally used python2 instead of python 3. :-(
--
This message has been scanned for
On Sun, Nov 17, 2013 at 8:19 AM, Laszlo Nagy gand...@shopzeus.com wrote:
print(digest,digest,type(digest))
This function was called inside a script, and gave me this:
('digest', '\xa0\x98\x8b\xff\x04\xf9V;\xbd\x1eIHzh\x10-\xc5!\x14\x1b', type
'str')
This looks very much like you're
On Sun, Nov 17, 2013 at 8:44 AM, Laszlo Nagy gand...@shopzeus.com wrote:
So is the default utf-8 or not? Should the documentation be updated? Or do
we have a bug in the interactive shell?
It was my fault, sorry. The other program used os.system at some places, and
it accidentally used
Hi All,
How could i increase the unicode range beyond 1 ?
In python 2.5.4 by default the unicode range is 0x1, but in some cases
i have unicode char beyond the limit. For those conditions it th an error.
File E:\OpenERP\OpenERP
AllInOne\Server\library.zip\reportlab\pdfbase\ttfonts.py,
But how could i do this in Windows.
It's not supported. Hopefully, it will be supported in Python 3.3,
due to PEP 393.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
On 4/29/2011 7:52 AM, sathe...@e-ndicus.com wrote:
How could i increase the unicode range beyond 1 ?
Use Python3, which, after renaming unichar to chr, changed it to always
accept the full range of codepoints, even when that means returning a
two-char string on narrow builds, like
Can't believe I missed something as simple as u'smt', and I even saw
that on many occasions...
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Sep 20, 2010 at 05:42, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
Use the PEP 263 encoding
declaration URL:http://www.python.org/dev/peps/pep-0263/ to let Python
know the encoding of the program source file.
While PEPs are valuable, once accepted or rejected they
Dotan Cohen wrote:
On Mon, Sep 20, 2010 at 05:42, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
Use the PEP 263 encoding
declaration URL:http://www.python.org/dev/peps/pep-0263/ to let Python
know the encoding of the program source file.
While PEPs are valuable, once accepted
On Mon, Sep 20, 2010 at 12:20, Peter Otten __pete...@web.de wrote:
It may work by accident, if you declare it as UTF-8, because that is also
the default in Python 3.
That does seem to be the case.
Thank you for the enlightenment and information.
--
Dotan Cohen
http://gibberish.co.il
Am 20.09.2010 12:57, schrieb Dotan Cohen:
On Mon, Sep 20, 2010 at 12:20, Peter Otten __pete...@web.de wrote:
It may work by accident, if you declare it as UTF-8, because that is also
the default in Python 3.
That does seem to be the case.
Thank you for the enlightenment and information.
Hi everybody.
I've played for few hours with encoding in py, but it's still somewhat
confusing to me. So I've written a test file (encoded as utf-8). I've
put everything I think is true in comment at the beginning of script.
Could you check if it's correct (on side note, script does what I
One more thing, is there some mechanism to avoid writing all the time
'something'.decode('utf-8')?
Yes, use u'something' instead (i.e. put the letter u before the literal,
to make it a unicode literal). Since Python 2.6, you can also put
from __future__ import unicode_literals
at the top
Goran Novosel goran.novo...@gmail.com writes:
# vim: set encoding=utf-8 :
This will help Vim, but won't help Python. Use the PEP 263 encoding
declaration URL:http://www.python.org/dev/peps/pep-0263/ to let Python
know the encoding of the program source file.
# -*- coding: utf-8 -*-
You
On Sep 19, 4:09 pm, Ben Finney ben+pyt...@benfinney.id.au wrote:
Goran Novosel goran.novo...@gmail.com writes:
# vim: set encoding=utf-8 :
This will help Vim, but won't help Python. Use the PEP 263 encoding
declaration URL:http://www.python.org/dev/peps/pep-0263/ to let Python
know the
On Mon, 20 Sep 2010 09:09:31 +1000, Ben Finney wrote:
Goran Novosel goran.novo...@gmail.com writes:
# vim: set encoding=utf-8 :
This will help Vim, but won't help Python.
It will actually -- the regex Python uses to detect encoding lines is
documented, and Vim-style declarations are
with
the files even if you can't display the filenames.
If you are running on Windows and using the native Python to access an NTFS
formatted partition then there shouldn't be a problem: the filenames are
stored as unicode and Python uses the unicode apis. Of course you may still
not be able
jeffunit j...@jeffunit.com wrote in message
news:20090915144123964.ljka6...@cdptpa-omta01.mail.rr.com...
I wrote a program that diffs files and prints out matching file names.
I will be executing the output with sh, to delete select files.
Most of the files names are plain ascii, but about 10%
At 09:25 PM 9/15/2009, Mark Tolonen wrote:
jeffunit j...@jeffunit.com wrote in message
news:20090915144123964.ljka6...@cdptpa-omta01.mail.rr.com...
I wrote a program that diffs files and prints out matching file names.
I will be executing the output with sh, to delete select files.
Most of the
On Tue, Sep 15, 2009 at 9:48 PM, jeffunit j...@jeffunit.com wrote:
At 09:25 PM 9/15/2009, Mark Tolonen wrote:
jeffunit j...@jeffunit.com wrote in message
news:20090915144123964.ljka6...@cdptpa-omta01.mail.rr.com...
I wrote a program that diffs files and prints out matching file names.
I
1 Objective to write little programs to help me learn German. See code
after numbered comments. //Thanks in advance for any direction or
suggestions.
tk
2 Want keyboard answer input, for example:
answer_str = raw_input(' Enter answer ') Herr Üü
[ I keyboard in the following characters
On Jul 14, 1:51 pm, anonymous [EMAIL PROTECTED] wrote:
1 Objective to write little programs to help me learn German. See code
after numbered comments. //Thanks in advance for any direction or
suggestions.
tk
2 Want keyboard answer input, for example:
answer_str = raw_input(' Enter
39 matches
Mail list logo