Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://www.python.org/doc/2.5.2/tut/node8.html#SECTION008420000000000000000" rel="nofollow noreferrer">Relative imports</a> (<a href="http://www.python.org/dev/peps/pep-0328/" rel="nofollow noreferrer">PEP 328</a>) might help:</p> <pre><code>eggs/ __init__.py foo.py bar.py # foo.py from __future__ import absolute_import from . import bar </code></pre> <p>See <a href="https://stackoverflow.com/questions/171785/how-do-you-organize-python-modules">How do you organize Python modules?</a> for other options.</p> <p>EDIT:</p> <p>Yet another option is to use S.Lott's and Jim's suggestions i.e, restructure your package to factor out a <code>eggs.foo</code> part used by <code>eggs.bar.a</code> and use <code>git</code> to work on experimental branches (see <a href="http://book.git-scm.com/" rel="nofollow noreferrer">Git Community Book</a>).</p> <p>Here's an example:</p> <pre><code>$ git status # On branch master nothing to commit (working directory clean) </code></pre> <p>[just to make sure that all is good]</p> <pre><code>$ git checkout -b experimental Switched to a new branch "experimental" </code></pre> <p>[work on experimental stuff]</p> <pre><code>$ git commit -a </code></pre> <p>[commit to experimental branch]</p> <pre><code>$ git checkout master Switched to branch "master" </code></pre> <p>[work on master branch]</p> <pre><code>$ git commit -a </code></pre> <p>To merge changes into master branch: </p> <pre><code>$ git merge experimental </code></pre> <p>See chapter <a href="http://book.git-scm.com/3_basic_branching_and_merging.html" rel="nofollow noreferrer">Basic Branching and Merging</a> from the above book.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload