How to reference object properties in another module
<p>I am relatively new to Python having used C# for many years and I'm hoping someone can help me with this question.  I have a module called actuators.py that contains a number of classes for defining properties and methods for the servos I use in a robot project.  In another module called robot.py, I instantiate my actuators like this:</p>

<pre><code>import actuators as Actuators

myActuators = Actuators.AllActuators()
</code></pre>

<p>This allows me to access the properties of my servos as long as I am in the robot.py module.  For example, I can write:</p>

<pre><code>print myActuators.HeadTilt.MinPosition
</code></pre>

<p>to get the minimum value allowed for the servo that tilts the robot's head.  So far so good.</p>

<p>Now I want to access these same values in a separate thread that is defined by a different module called tilt_head.py. I assume I need to import a reference to the robot.py module, but doing this ends up re-executing all the code in robot.py whereas all I really want is a static reference to the myActuators object.  And I can't use</p>

<pre><code>from robot.py import myActuators
</code></pre>

<p>because myActuators is not a module.</p>

<p>In C#, I would do this using a declaration like this:</p>

<pre><code>public static Actuators myActuators;
</code></pre>

<p>which then allows me to reference myActuators in any other file within my project.  Is there a way to do something similar in Python?  If you need my actual code, I will be happy to post it.</p>

<p>Thanks!</p>
