Ulrich Eckhardt writes:
> I have a few tests that require a network connection. Typically, the
> target will be localhost on port 2. However, sometimes these
> settings differ, so I want to be able to optionally set them.
I subscribe to the view that an application's user-configurable settin
REMOTE_HOST = 'localhost' REMOTE_PORT = 2 try:
from .settings import * except ImportError: pass
This works? If you're using an old version of Python you may need to
mess about with __future__.
On Thu, Nov 24, 2011 at 10:56 PM, Ulrich Eckhardt
wrote:
> Hi!
>
> I have a few
Hi!
I have a few tests that require a network connection. Typically, the
target will be localhost on port 2. However, sometimes these
settings differ, so I want to be able to optionally set them.
What I'm currently doing is this:
try:
from settings import REMOTE_HOST, REMOTE_