Linked Questions

1 vote
1 answer
2k views

Here is my code: import time as t print('hello', end=' ') t.sleep(1) print('hello', end=' ') t.sleep(1) print('hello', end=' ') t.sleep(1) My problem is that all the print commands are executed ...
mohamad mahdi reisi's user avatar
0 votes
2 answers
1k views

I want to make a program which outputs the text as if it is typed live. For that, I am printing a word and waiting for 0.2 seconds and then other. I have saw this website: https://www.tutorialspoint....
Shivam Pachchigar's user avatar
0 votes
1 answer
597 views

test.py (work): import time _, a, b = [1, 2, 3] print a print b run the code: python test.py > test.log you will get the log in test.log test.py (not work): import time _, a, b = [1, 2, 3] print ...
Levi's user avatar
  • 175
1 vote
1 answer
819 views

im a beginner at python and i've come across what is probably a simple problem. I want the code below to print the "." x times, each .100 of a second after each other. This is what ive got, but it ...
Rallph's user avatar
  • 17
1 vote
0 answers
821 views

I have a Python script on Windows which prints text to the cmd prompt every 60 seconds, but sometimes it hangs and doesn't print the text until I press the Return key. Brief overview: for i in ...
mbudge's user avatar
  • 567
-3 votes
1 answer
586 views

I have a problem with my python program, it is supposed to print each character individually with a delay in between. Here is my code: import time import os txt=open("text",'r').read() delay=...
jackedak's user avatar
0 votes
2 answers
688 views

I had several print() statements in my code. I want run the code overnight and have them write to file. I tried redirecting output to file as: python mycode.py >> log.txt While python process ...
Rnj's user avatar
  • 1,199
1 vote
2 answers
469 views

I would like to code a python that adds every x seconds a value. But when I add the time.sleep(x) theres no output into the .txt file anymore. And is there a way to stop the loop after a certain time?...
julrie's user avatar
  • 13
2 votes
1 answer
165 views

while True: volts = adc.readADCDifferential01(4096, 8) print volts This works fine except that it prints out a column of voltages that quickly fills up the terminal screen. I'd rather it print ...
Rico's user avatar
  • 329
1 vote
1 answer
189 views

I was trying to make a code like this def no(t=.001): print("N", end='') for i in range(1000): print('o', end='') time.sleep(t) print() So that when I call no() ...
ABO's user avatar
  • 174
1 vote
1 answer
220 views

In the code below, the diamond characters (\4) are not printed immediately but after the loop is completed. Any ideas why? from os import system from time import sleep def load(): system('cls') ...
Bharath Kumar R's user avatar
-1 votes
1 answer
185 views

This is a python2 script how can i use this on python3 import sys for x in range(10000): print "HAPPY >> %s <<\r" % str(x), sys.stdout.flush()
ABIR HASSAN's user avatar
0 votes
1 answer
137 views

First, look at this: import time wait = time.sleep def put(char): print(char, end='') def text(*pieces): for p in pieces: for c in p: put(p) wait(0.25) I ...
user avatar
0 votes
1 answer
101 views

I want to have results in real time of exections python script via cmd. My C# code with start pyhton script: static void cmd_DataReceived(object sender, DataReceivedEventArgs e) { // ...
Adamszsz's user avatar
  • 581
0 votes
2 answers
89 views

print ('hello, welcome to our bar') age = int(input("What is your age")) if age < 21: print ('*kicks your ass out of bar*') else: print("come on in") I am able to run ...
ColoradoKid's user avatar

15 30 50 per page
1
2 3 4 5
11