basic python module design question
<p>I have:</p>

<pre><code>lib/
lib/__init__.py
lib/game.py
</code></pre>

<p>In <code>__init__.py</code> I'd like to define a variable that can be accessed by any class inside lib, like so:</p>

<pre><code>BASE = 'http://www.whatever.com'
</code></pre>

<p>And then inside game.py, acces it inside in the Game class:</p>

<pre><code>class Game:

def __init__(self, game_id):
    self.game_id = game_id

    url = '%syear_%s/month_%s/day_%s/%s/' % (lib.BASE, year, month, day, game_id)
</code></pre>

<p>Yeah so clearly 'lib.BASE' isn't right- what's the convention here? Is there a tidier, more pythonic way to handle what I'd call package-global variables?</p>
