Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Make GH Python print() stay with buttons (disappear after a second)

$
0
0

Hi I have a button “z” connect to my gh python.
My print() will only stay for half a sec after I pressed the button then disappear
How can I make the print() stay, until the next time press the button again to update

sample code of a timer:

import time 

def main():
    time1=time.time()
    if z:
        time.sleep(1)
        print("aaa")
    time2=time.time()
    print("time :" + round(time2-time1,2).ToString())
    
main()

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles