Ian Kelly wrote:
> If you want your output to behave that way, then all you have to do is
> specify that with an explicit encode step.
ok
>> If we want we change default for whatever we want, but without this
>> "default change" Python should not change his behavior depending on
>> output. yeah
Ben Finney wrote:
>> > What should it decode to, then?
>>
>> UTF-8, as in tty
>
> But when you explicitly redirect to a file, it's not going to a TTY.
> It's going to a file whose encoding isn't known unless you specify it.
ok after thinking about this, this problem exist because Python want be
Ben Finney wrote:
>> >> Exactly the opposite , if python don't know the encoding should not
>> >> try decode to ASCII.
>
> Are you advocating that Python should refuse to write characters unless
> the encoding is specified? I could sympathise with that, but currently
> that's not what Python does
Mark Tolonen wrote:
>
> "Sérgio Monteiro Basto" wrote in message
> news:4df137a7$0$30580$a729d...@news.telepac.pt...
>
>> How I change sys.stdout.encoding always to UTF-8 ? at least have a
>> consistent sys.stdout.encoding
>
> There is an environment va
Nobody wrote:
>> Exactly the opposite , if python don't know the encoding should not try
>> decode to ASCII.
>
> What should it decode to, then?
UTF-8, as in tty, how I change this default ?
> You can't write characters to a stream, only bytes.
>
ok got the point .
Thanks,
--
http://mail.p
Ben Finney wrote:
> Sérgio Monteiro Basto writes:
>
>> ./test.py
>> moçambique
>> moçambique
>
> In this case your terminal is reporting its encoding to Python, and it's
> capable of taking the UTF-8 data that you send to it in both cases.
>
>> .
Benjamin Kaplan wrote:
> 2011/6/8 Sérgio Monteiro Basto :
>> hi,
>> cat test.py
>> #!/usr/bin/env python
>> #-*- coding: utf-8 -*-
>> u = u'moçambique'
>> print u.encode("utf-8")
>> print u
>>
>> chmod +x test.py
>&
hi,
cat test.py
#!/usr/bin/env python
#-*- coding: utf-8 -*-
u = u'moçambique'
print u.encode("utf-8")
print u
chmod +x test.py
./test.py
moçambique
moçambique
./test.py > output.txt
Traceback (most recent call last):
File "./test.py", line 5, in
print u
UnicodeEncodeError: 'ascii' codec
Hi,
Srijit Kumar Bhadra wrote:
> Is there any reason why lxml-2.2.4-py2.6-win32.egg (md5) or
> lxml-2.2.4.win32-py2.6.exe is not available?
>
> Best regards,
> /Srijit
maybe ask on lxml Mailing List , should be more appropriated
Sérgio M. B.
--
http://mail.python.org/mailman/listinfo/python
Diez B. Roggisch wrote:
> Sérgio Monteiro Basto schrieb:
>> Diez B. Roggisch wrote:
>>
>> Hi, Thanks,
>>> Sérgio Monteiro Basto wrote:
>>>
>>>> Hi,
>>>> I am in x86_64 arch , but I need
>>>> compile things on 32 bits wit
Diez B. Roggisch wrote:
Hi, Thanks,
> Sérgio Monteiro Basto wrote:
>
>> Hi,
>> I am in x86_64 arch , but I need
>> compile things on 32 bits with
>> python setup.py build
>>
>> Can't change the fact that distutils creates x86_64
>> director
Hi,
I am in x86_64 arch , but I need
compile things on 32 bits with
python setup.py build
Can't change the fact that distutils creates x86_64
directories:
build/temp.linux-x86_64-2.3/
Also if I try with a python compile in 32bits and installed
in system .
how I force distutils build to 32-bi
Hi,
I am in x86_64 arch , but I need
compile things on 32 bits.
python setup.py build
Can't change the fact that distutils creates x86_64
directories:
gcc -pthread -shared build/temp.linux-x86_64-2.3/
Also if I try with a python compile in 32bits and installed
in system .
how I force distuti
Stefan Behnel wrote:
> Sérgio Monteiro Basto wrote:
>> but is one single error that blocks this.
>> Finally I found it , it is :
>> > if I put :
>> >
>> p = re.compile('"align')
>> content = p.sub('" align', content)
>
First, sorry about the mess, let see if kontact works better with
newsgroups.
Marc 'BlackJack' Rintsch wrote:
>> ok but my problem is not understand what is the specific problem at line
>> 1173
>
> You can't just look at that line and ignore the rest. There are 604 (!)
> errors, some about tabl
15 matches
Mail list logo