Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57896 > unrolled thread

Re: Organising packages/modules - importing functions from a common.py in a separate directory?

Started byJean-Michel Pichavant <jeanmichel@sequans.com>
First post2013-10-29 10:02 +0100
Last post2013-10-29 10:02 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Re: Organising packages/modules - importing functions from a common.py in a separate directory? Jean-Michel Pichavant <jeanmichel@sequans.com> - 2013-10-29 10:02 +0100

#57896 — Re: Organising packages/modules - importing functions from a common.py in a separate directory?

FromJean-Michel Pichavant <jeanmichel@sequans.com>
Date2013-10-29 10:02 +0100
SubjectRe: Organising packages/modules - importing functions from a common.py in a separate directory?
Message-ID<mailman.1751.1383037359.18130.python-list@python.org>
----- Original Message -----
> Hi,
> 
> If I try to use:
> 
>     from .common.common_foo import setup_foo_logging
> 
> I get:
> 
>     ValueError: Attempted relative import in non-package

If you're using python 3, forget what I said about not using relative imports. I think they've implemented the necessary grammar to make it work.

Cheers,

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web