Thanks, Alan.<br>Yes, the thing is getting to be a pain to deal with at this size, i am in-process of splitting out the classes into their own files. <br>Thanks for your help.<br><br>shawn<br><br><div><span class="gmail_quote">
On 12/30/06, <b class="gmail_sendername">Alan Gauld</b> <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>"shawn bright" <<a href="mailto:nephish@gmail.com">nephish@gmail.com</a>> wrote i<br><br>> testing this right away. This long a .py script is becomming a<br>> headache and<br>> i think it will be easier by far if it is pulled apart somewhat.
<br><br>As a general rule of thumb, any Python script (or any programming<br>language file for that matter!) that gets longer than 4 or 5 hundred<br>lines should be looked at closely in terms of splitting it into<br>modules.
<br><br>There are a few (very few) times where I've seen a thousand line<br>file that was justified, but nearly any time you get beyond 500<br>lines you should be splitting things up - especially in high level<br>languages like Python where the methods/functions tend to be
<br>short anyway.<br><br>FWIW<br><br>A quick check of the Python standard library shows the<br>average file size there to be: 459 lines(*) And that's pretty<br>high IMHO!<br><br>There are 19 files over a thousand lines and the biggest file
<br>is over 3000 lines... which seems way too big to me!<br>But that's out of 188 files...<br><br>(*)<br>Cygwin; Python 2.4<br>In case you want to repeat for your version I used:<br>>>> libs = [len(open(f).readlines()) for f in glob('*.py')]
<br>>>> print sum(libs)/len(libs)<br>>>> print max(libs)<br>>>> print len([s for s in libs if s>1000])<br><br>Alan G<br><br><br>_______________________________________________<br>Tutor maillist -
<a href="mailto:Tutor@python.org">Tutor@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br></blockquote></div><br>