Python Forum
print is showing non printable characters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
print is showing non printable characters
#6
Can call dir like this in a list.
Need to use encoding CP850,old history from DOS carried forward to the terminal window,use cmder.
import subprocess

output = subprocess.run(['cmd', '/c', 'dir'], capture_output=True)
print(output.stdout.decode('CP850'))
Reply


Messages In This Thread
RE: print is showing non printable characters - by snippsat - May-05-2019, 10:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  email Library: properly send message as quoted-printable malonn 3 1,346 Nov-14-2022, 09:31 PM
Last Post: malonn
  is this Unicode printable? Skaperen 2 1,451 Sep-23-2021, 01:25 AM
Last Post: Skaperen
  Print characters in a single line rather than one at a time hhydration 1 2,043 Oct-10-2020, 10:00 PM
Last Post: bowlofred
  get two characters, count and print from a .txt file Pleiades 9 3,410 Oct-05-2020, 09:22 AM
Last Post: perfringo
  Remove escape characters / Unicode characters from string DreamingInsanity 5 13,794 May-15-2020, 01:37 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020