Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > max length of a python program

Reply
Thread Tools

max length of a python program

 
 
Ragu
Guest
Posts: n/a
 
      08-21-2003
Is there a limit to the # of lines that can be in a Python program?

cheers
-Ragu
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Gerhard_H=E4ring?=
Guest
Posts: n/a
 
      08-21-2003
Ragu wrote:
> Is there a limit to the # of lines that can be in a Python program?


The free version from python.org is limited to 500 lines per module.
I'll gladly sell you Python Enterprise 2003, which has no lines of code
limits at all and where code size is only limited by available memory.

The current price is EUR 250 per seat or EUR 5000 for a site-license.
One year of free support via Usenet (comp.lang.python) is included.

-- Gerhard

 
Reply With Quote
 
 
 
 
Lawrence Oluyede
Guest
Posts: n/a
 
      08-21-2003
Ragu wrote:

> Is there a limit to the # of lines that can be in a Python program?


No AFAIK.
The only limitation is the common sense, nobody wants to drown into comments


--
Lawrence "Rhymes" Oluyede
http://loluyede.blogspot.com
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
Michael Hudson
Guest
Posts: n/a
 
      08-21-2003
(E-Mail Removed) (Ragu) writes:

> Is there a limit to the # of lines that can be in a Python program?


I can't seem to find one, although trying to run a million line file
got the OOM killer into action...


Cheers,
mwh
--
ZAPHOD: OK, so ten out of ten for style, but minus several million
for good thinking, eh?
-- The Hitch-Hikers Guide to the Galaxy, Episode 2
 
Reply With Quote
 
Andrew Dalke
Guest
Posts: n/a
 
      08-21-2003
Ragu:
> Is there a limit to the # of lines that can be in a Python program?


Many years ago there was a limit of 64K lines, because of how
the line number opcode worked in Python. Only machine
generated Python code ever ran into that limit.

That limit was removed in .. 1.5? Can't find mention of
the fix in my cursory search.

So no, no effective limit.

Andrew
(E-Mail Removed)


 
Reply With Quote
 
Paul Watson
Guest
Posts: n/a
 
      08-21-2003

"Lawrence Oluyede" <(E-Mail Removed)> wrote in message
news:bi2lbm$3v6fr$(E-Mail Removed)-berlin.de...
> Ragu wrote:
>
> > Is there a limit to the # of lines that can be in a Python program?

>
> No AFAIK.
> The only limitation is the common sense, nobody wants to drown into

comments
>
>
> --
> Lawrence "Rhymes" Oluyede
> http://loluyede.blogspot.com
> (E-Mail Removed)


Probably no fear of drowning in comments. It seems that many peole who
write seemingly excesslively long source code files do not want to waste
disk space or processing time on something so useless as comments.


 
Reply With Quote
 
Christos TZOTZIOY Georgiou
Guest
Posts: n/a
 
      08-22-2003
On Thu, 21 Aug 2003 15:22:30 +0200, rumours say that Gerhard Häring
<(E-Mail Removed)> might have written:

>Ragu wrote:
>> Is there a limit to the # of lines that can be in a Python program?

>
>The free version from python.org is limited to 500 lines per module.
>I'll gladly sell you Python Enterprise 2003, which has no lines of code
>limits at all and where code size is only limited by available memory.
>
>The current price is EUR 250 per seat or EUR 5000 for a site-license.
>One year of free support via Usenet (comp.lang.python) is included.


Really? A few years ago, when I bought Python for the first time, the
entry price I paid was my right hand and rights on my firstborn. Things
have changed...

Microsoft Python: bringing innovation to higher levels at a friendly
price.
--
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.
 
Reply With Quote
 
Michael Hudson
Guest
Posts: n/a
 
      08-22-2003
Christos "TZOTZIOY" Georgiou <(E-Mail Removed)> writes:

> On Thu, 21 Aug 2003 17:25:51 GMT, rumours say that "Andrew Dalke"
> <(E-Mail Removed)> might have written:
>
> >Many years ago there was a limit of 64K lines, because of how
> >the line number opcode worked in Python. Only machine
> >generated Python code ever ran into that limit.

>
> What is the width of JUMP opcode offsets? If it is 16 bit, is there a
> chance that someday somebody is going to write such a large basic block
> that their program will fail?


I'm pretty sure that limit has been lifted too (in the 2.0 timeframe?
Not sure). I think you can have basic blocks the full 2^32 bytes long
now

Cheers,
mwh

--
Check out the comments in this source file that start with:
# Oh, lord help us.
-- Mark Hammond gets to play with the Outlook object model
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
want max width and max height as long as not exceed 100px Summercool HTML 9 10-23-2007 02:27 AM
ADSL Max/Max Gordy NZ Computing 6 11-24-2006 11:41 PM
Textarea max rows and max characters per row Greg Ferris Javascript 2 01-16-2004 07:21 PM
Max Apperture and Max. Shutter Speed Confusion-HELP bhaskar Digital Photography 12 07-22-2003 05:17 PM



Advertisments