Re: os.system: string encoding

2010-06-29 Thread Lawrence D'Oliveiro
In message , Peter Kleiweg wrote: > How do I set the string encoding for os.system to anything other then > UTF-8? Works for me (on Debian Unstable): l...@theon:~> echo $LC_ALL en_NZ.utf8 l...@theon:~> python3.1 Python 3.1.2 (r312:79147, May 8 2010, 13:27:06) [GCC 4.4.4] o

Re: os.system: string encoding

2010-06-27 Thread Martin v. Loewis
>> For the moment, you can encode the string explicitly, and pass a byte >> string. > > That doesn't work I only have 3.1.2 to test at the moment. I suggest trying to use the subprocess module instead. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system: string encoding

2010-06-27 Thread Peter Kleiweg
Martin v. Loewis schreef op de 27e dag van de zomermaand van het jaar 2010: > Am 25.06.2010 17:13, schrieb Peter Kleiweg: > > How do I set the string encoding for os.system to anything other then UTF-8? > > You shouldn't have to set it, as it should use your locale's encoding. > In 3.1.2, it will

Re: os.system: string encoding

2010-06-27 Thread Martin v. Loewis
Am 25.06.2010 17:13, schrieb Peter Kleiweg: > How do I set the string encoding for os.system to anything other then UTF-8? You shouldn't have to set it, as it should use your locale's encoding. In 3.1.2, it will. For the moment, you can encode the string explicitly, and pass a byte string. Regar

os.system: string encoding

2010-06-25 Thread Peter Kleiweg
How do I set the string encoding for os.system to anything other then UTF-8? (peter) ~ echo $LANG nl...@euro (peter) ~ python3 Python 3.1.1 (r311:74480, Oct 2 2009, 11:50:52) >>> '\N{EURO SIGN}' '€' >>> import os >>> os.system('echo \N{EURO SIGN}') â?¬ 0 >>> -- Peter Kleiweg -- http://mai