Issue
I am using mac. I wrote the below code to clear the screen
>>> import os
>>> os.system('clear')
it should clear the screen but its returning 256
its returning 1 for
import subprocess
>>> subprocess.call("clear")
Solution
I run os.system('clear')
on Ubuntu 11.04 alternate : it cleared the screen.
The return value you get depends on the operating system as Python documentation states:
Note that POSIX does not specify the meaning of the return value of the C system() function, so the return value of the Python function is system-dependent.
Answered By - user3522371
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.