Re: Are there sprintf in Python???

2007-01-26 Thread Facundo Batista
questions? wrote: Are there similar function to sprintf in C? Meaning to print in a buffer? It's not necessary... Remember that all the ways that prints on files, actually does not need to print into *actual* files, but they can print into file-like objects (see StringIO, or mmap, for

Re: Are there sprintf in Python???

2007-01-23 Thread Neil Cerutti
On 2007-01-22, questions? [EMAIL PROTECTED] wrote: Are there any sprintf in Python? I know you can print to files(or redefine sys.stout) and later open the file content. Are there similar function to sprintf in C? No, but you can compose a similar function very easily. def sprintf(format

Re: Are there sprintf in Python???

2007-01-23 Thread Manuel Graune
questions? [EMAIL PROTECTED] writes: Are there any sprintf in Python? I know you can print to files(or redefine sys.stout) and later open the file content. Are you looking for something like this? http://norvig.com/python-iaq.html or http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe

Are there sprintf in Python???

2007-01-22 Thread questions?
Are there any sprintf in Python? I know you can print to files(or redefine sys.stout) and later open the file content. Are there similar function to sprintf in C? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Are there sprintf in Python???

2007-01-22 Thread rzed
questions? [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: Are there any sprintf in Python? I know you can print to files(or redefine sys.stout) and later open the file content. Are there similar function to sprintf in C? Something like this? x = 9 vbl = One digit: %d, four digits

Re: Are there sprintf in Python???

2007-01-22 Thread Nanjundi
Are there any sprintf in Python? Refer module StringIO - just like file input/output operations. cStringIO is another module (faster) Quick intro: from StringIO import StringIO s = StringIO() s.write('hello') s.seek(0) print s.read() -N -- http://mail.python.org/mailman/listinfo/python