ungetc in python

Scott Fenton scott at fenton.baltimore.md.us
Fri Jan 31 07:05:15 EST 2003


Hello. I was wondering if anyone knew if there was 
an equivilant of ungetc in Python. I Googled for it
and didn't find anything, and I need it for a parser
I'm working on.

TIA
-Scott Fenton

-- 
char m[9999],*n[99],*r=m,*p=m+5000,**s=n,d,c;main(){for(read(0,r,4000);c=*r;
r++)c-']'||(d>1||(r=*p?*s:(--s,r)),!d||d--),c-'['||d++||(*++s=r),d||(*p+=c==
'+',*p-=c=='-',p+=c=='>',p-=c=='<',c-'.'||write(1,p,1),c-','||read(2,p,1));}




More information about the Python-list mailing list