19
বাইটগুলি স্ট্রিংয়ে রূপান্তর করুন
বাহ্যিক প্রোগ্রাম থেকে মানক আউটপুট পেতে আমি এই কোডটি ব্যবহার করছি: >>> from subprocess import * >>> command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0] যোগাযোগ () পদ্ধতিটি বাইটগুলির একটি অ্যারে প্রদান করে: >>> 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' …
2299
python
string
python-3.x