On Fri, Dec 5, 2014 at 4:36 AM, Jean-Michel Pichavant
<jeanmic...@sequans.com> wrote:
> I know you specifically stated you didn't want to do this but
>
> import os
>
> os.path.isfile()
>
> is the best option imo, especially from the reader point of view ("Namespaces 
> are one honking great idea").

With os.path it definitely is. With the actual code in question, it's
a Python 2.7 project that mostly uses relative imports - inside
package.module1 is "import module2" etc - and I was writing an
external script that calls on one of the modules. So it makes sense to
reference it through the code the exact same way, as "module.blah"
rather than "package.module.blah".

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to