Emulating C++ coding style

M.-A. Lemburg mal at lemburg.com
Fri Apr 23 05:43:34 EDT 1999


Thooney Millennier wrote:
> 
> Hello Everyone!
> 
> 2. stream class
>   e.g. cout << "hello python."<<endl;

Try StringList.py:

	http://starship.skyport.net/~lemburg/StringList.py
or
	http://starship.skyport.net/~lemburg/StringList.py.html

>>> import StringList,sys
>>> cout = StringList.StringList()
>>> endl = '\n'
>>> cout << "hello python" << endl
StringList: ['hello python', '\012']
>>> cout.pack() >> sys.stdout
hello python

-- 
Marc-Andre Lemburg                               Y2000: 252 days left
---------------------------------------------------------------------
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :
           ---------------------------------------------------------





More information about the Python-list mailing list