How big can a Python program be?

Paddy McCarthy paddy3118 at netscape.net
Tue Aug 17 15:23:40 EDT 2004


vronskij at post.sk wrote in message news:<903b3fba.0408170333.49ce3944 at posting.google.com>...
> Hi,
> 
> A C program can be hundreds of thousands lines of code big.
> C++ millions.
> 
> How about Python?
> 
> Suppose , you are a sole programmer (lonewolf). How many lines can one handle?
> 
> Thanks,
> 
> 
> jan bodnar

Well, heres my quarter-million line Python 'Program' executing


pad at Williams-McCarthy:/tmp$ python -c 'print "x=0"
for i in xrange(2**18):print "x+=",`i`
print "print x"' > silly.py
pad at Williams-McCarthy:/tmp$ wc -l silly.py
262146 silly.py
pad at Williams-McCarthy:/tmp$ nice python silly.py
34359607296


It did start to swap but didn't take too long to finish on my 256Meg
Debian Linux, Athlon 1470MHz  machine

:-)  Pad.



More information about the Python-list mailing list