Question:
Python, clear screen function error "TERM environment variable not set"?
Kyle
2011-07-02 09:49:27 UTC
So, I thought I'd try to put what I learned within a few hours together but it seems that one function doesn't work. Here's a copy and paste of what I'm trying to get to work so far

"def clear():
import os
os.system("clear")
def sleep():
import os
os.system("sleep 1")
def sleep2():
import os
os.system("sleep 2")
def sleep3():
import os
os.system("sleep 3")
name = raw_input("What is your name?: ")
print("Hello there " + name + ", how are you?")
sleep()
clear()"

Here is the output

"/usr/bin/python -u "/home/theif519/Scripting/Python/Test.py"
What is your name?: Louis
Hello there Louis, how are you?
TERM environment variable not set.
"

What does it mean by "TERM environment variable not set."?
Running Kubuntu 11.04 with Dr. Python IDE
Five answers:
?
2011-07-02 09:52:28 UTC
Clear only works from a terminal. You're not running in a terminal, you're running in an IDE so the terminal-specific behavior won't work.
anonymous
2016-05-15 17:02:42 UTC
I know I've mastered the ability to walk, talk and read. There's nothing much left to learn in these fields, and I can do it all with complete ease. Doesn't mean I never stub my toe, slur a few words, or stumble on a sentence now and then, but I've reached a point where it's completely causal. I'm not an olympic sprinter, or a public speaker, or a speed reader -- those are all entirely separate skills -- but what I learned is plenty to get through life. I never forget that the martial arts are called an art, whether or not that's an Eastern interpretation, but in the West this does have a purpose. An art couldn't be something you perfect. Music, painting and sculpting all have near limitless potential, but stages of development that you would have to "master" to get better. A black belt, as we've explained before on here, is about having a firm understanding of the fundamentals, or "All basic movements and techniques, can be applied with extended force and proper application in basic combination." The key words here would be "all basic movements and techniques" and "extended force and proper application". I would say there is a mastery of having LEARNED the requirements and KNOW how to put them to use, just not anything further from the basics. I think people go a little too far with the word, using it mostly erroneously, but the intent of comfortably and casually using what you've learned is what they're all implying. As for the martial arts as a whole, that I believe is impossible, especially as an art.
stoecker
2016-09-29 15:18:18 UTC
Term Environment Variable Not Set
anonymous
2016-12-15 18:53:11 UTC
Clear Screen Python
DHARAVATH SURESH
2014-01-21 05:07:52 UTC
import os

//

.

..

..

.

#your progrms goes here

.

.

//

//if you want to clear after the output then at the end write the below instruction



os.system("clear")



It will clear all the things which have printed just before on the sreen.



If you want you can keep the same instruction between any instruction in program it wil clear the things which have printed before executing the clear instruction


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...