Ask Your Question
1

Tried to use os.system('clear') but had a problem.

asked 2021-01-18 10:19:50 -0500

kc gravatar image

updated 2021-01-19 10:32:03 -0500

Hi all,

This is my script:

from os import system

system('clear')

print('\nI am here!')

This is what displayed:

ESC[HESC[2J

I am here!

I am using MacOS Big Sur, Wing Pro 7.2.8.0 (rev 87ca750566c6) with python 3.9

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-19 08:58:08 -0500

This is due to Wing's Debug I/O tool not being a terminal emulator. It should work in an external console that can be enabled by using Configure External Console on the Options menu of the Debug I/O tool.

edit flag offensive delete link more

Comments

Hi, I followed your instruction and it worked fine. It seems that PyCharm is a bit easier for me to deal with than Wing. Just have to keep learning, I guess!

Thank you very much.

kc gravatar image kc  ( 2021-01-20 02:04:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-01-18 10:19:50 -0500

Seen: 89 times

Last updated: Jan 19