标签: python printing
我们如何在python中打印机上的文件内容?是否有类似C的stdprn在python中?
stdprn
#include<stdio.h> #include<stdlib.h> int main() { FILE *fp; char ch; fp=fopen("poem.txt","r"); while((ch=fgetc(fp))!=EOF) fputc(ch,stdprn); fclose(fp); return 0; }