19
Baytları bir dizeye dönüştürme
Harici bir programdan standart çıktı almak için bu kodu kullanıyorum: >>> from subprocess import * >>> command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0] Communications () yöntemi bir bayt dizisi döndürür: >>> command_stdout b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar 3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar 3 07:03 file2\n' Ancak, çıktı …
2307
python
string
python-3.x