Re: Library import succeeds with nose, fails elsewhere

2015-04-26 Thread richmolj
On Saturday, April 25, 2015 at 7:53:27 PM UTC-4, Chris Angelico wrote: > On Sun, Apr 26, 2015 at 9:36 AM, wrote: > > The solution ended up being editing the top-level __init__.py: > > > > import awesome > > > > and then *when in a subdirectory*: > > > > import awesome_lib as awesome > > > > and *

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread Chris Angelico
On Sun, Apr 26, 2015 at 9:36 AM, wrote: > The solution ended up being editing the top-level __init__.py: > > import awesome > > and then *when in a subdirectory*: > > import awesome_lib as awesome > > and *when in a different top-level file*: > > import awesome. > > IOW (from what I can tell) I m

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread richmolj
Thanks, I appreciate the help. I did figure this out. Chris - apologies for the error in my example, it should have been 'import util' within awesome.py. IOW, I was looking for awesome.util.helper to be available, and I also wanted awesome.foo available within helper.py. The solution ended up b

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread Chris Angelico
On Sun, Apr 26, 2015 at 3:48 AM, wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not finding > a great answer with lots of googling. I am writing a library, organized > something like this: > > awesome_lib/awesome.py > awesome_lib/util/__init__.py > awesome_lib/util/he

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not > finding a great answer with lots of googling. I am writing a library, > organized something like this: > > awesome_lib/awesome.py awesome_lib/util/__init__.py > awesome_lib

Re: Library import succeeds with nose, fails elsewhere

2015-04-25 Thread alister
On Sat, 25 Apr 2015 10:48:23 -0700, richmolj wrote: > Apologies, I'm a rubyist and this is a beginner question but I'm not > finding a great answer with lots of googling. I am writing a library, > organized something like this: > > awesome_lib/awesome.py awesome_lib/util/__init__.py > awesome_lib

Library import succeeds with nose, fails elsewhere

2015-04-25 Thread richmolj
Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this: awesome_lib/awesome.py awesome_lib/util/__init__.py awesome_lib/util/helper.py In the top of awesome.py: foo = 'bar' import