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> &lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt; 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>&quot;shawn bright&quot; &lt;<a href="mailto:nephish@gmail.com">nephish@gmail.com</a>&gt; wrote i<br><br>&gt; testing this right away. This long a .py script is becomming a<br>&gt; headache and<br>&gt; 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&#39;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&#39;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&#39;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>&gt;&gt;&gt; libs = [len(open(f).readlines()) for f in glob(&#39;*.py&#39;)]
<br>&gt;&gt;&gt; print sum(libs)/len(libs)<br>&gt;&gt;&gt; print max(libs)<br>&gt;&gt;&gt; print len([s for s in libs if s&gt;1000])<br><br>Alan G<br><br><br>_______________________________________________<br>Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;
<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>