[Tutor] Re: Limits in Python for number of lines / functions / classes / etc

Andrei project5 at redrival.net
Thu Aug 12 19:20:35 CEST 2004

Peter Rootham-Smith wrote on Thu, 12 Aug 2004 17:57:03 +0100:


> I'm new to Python and am considering using it to do something like 
> Nat's World, that is a slideshow you can point and click and move 
> around and do things.  I'm hoping to use pygame and make something 
> cross-platform (I develop on a Mac.)  Don't know easy this really is.

It's not trivial, but it doesn't sound extremely hard neither.

> I'm going to be generating Python code from a set of definition files.  
> What are the limits in Python for number of lines etc that I might hit? 
>   I've seen there was a limit on the number of lines in a file.

I don't know of any file size limit. The largest piece of Python code I've
ever handled is about 7 megabytes of code in a single .py file. Worked OK.
The code was (obviously) not hand-written, but it was data stored as Python
code (with str and eval).

But why would you need to generate such huge amounts of code? Wouldn't it
be better to save and load data in a bsddb?



Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.

More information about the Tutor mailing list