G
gervaz
Hi all, is there in python the equivalent of the C function int putchar
(int c)? I need to print putchar(8).
Thanks, Mattia
(int c)? I need to print putchar(8).
Thanks, Mattia
Hi all, is there in python the equivalent of the C function int putchar
(int c)? I need to print putchar(8).
or:
Oops. Instead of char(), I meant to type chr().Dave said:If I recall correctly, putchar() takes an int value 0-255 and outputs
a single character to stdout. So the equivalent would be:
sys.stdout.write(char(c))
print does other stuff, which you presumably do not want.
DaveA
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.