<div class="gmail_quote">On Mon, Jun 29, 2009 at 10:03 AM, Robert Lummis <span dir="ltr"><<a href="mailto:robert.lummis@gmail.com">robert.lummis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
... or any pre-processing at all?<br>
<br>
I'm looking for a way to get boiler plate code into the main program<br>
file. Of course I could copy and paste it with an editor but I was<br>
hoping for something more pythonic. I know about import but that's not<br>
the same.<br>
<font color="#888888"></font></blockquote><div><br>actually import is precisely the same.<br><br> wayne@x61:test$ vi import1.py<br>wayne@x61:test$ vi import2.py<br>wayne@x61:test$ python import1.py <br>Imported<br><br>The contents of import1? <br>
<br>import import2<br><br>The contents of import2?<br><br>print "Imported"<br><br>You can define functions, classes, etc.<br><br>you call them as whatever.function(), unless you say<br><br>from module import * - then it willl import everything into the namespace of your original file.<br>
<br>HTH,<br>Wayne<br></div></div><br>