import/from import question

Discussion in 'Python' started by Artur M. Piwko, Jun 29, 2003.

  1. Is there a way to detect if module was imported by 'from <mod> import <sth>'
    or by 'import <mod>'?

    Artur

    --
    Before the Goat of Mendes... we all must take our turn | Artur M. Piwko
    Into the magic circle... where still the fire burns | mailto:s/_/./
    We're spinning round and round... until one takes a fall | -- Mercyful Fate
    The fallen one will not return, the fallen one must burn | "Witches' Dance"
    Artur M. Piwko, Jun 29, 2003
    #1
    1. Advertising

  2. Artur M. Piwko

    Peter Hansen Guest

    "Artur M. Piwko" wrote:
    >
    > Is there a way to detect if module was imported by 'from <mod> import <sth>'
    > or by 'import <mod>'?


    Why do you want to do that? It's likely to be a bad idea...
    Peter Hansen, Jul 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Opal
    Replies:
    12
    Views:
    926
    Paul Opal
    Oct 11, 2004
  2. JPractitioner
    Replies:
    13
    Views:
    20,118
    Roedy Green
    Feb 24, 2006
  3. Vitali Gontsharuk
    Replies:
    2
    Views:
    553
    Vitali Gontsharuk
    Aug 25, 2005
  4. Dennis
    Replies:
    2
    Views:
    488
    Dennis
    Aug 18, 2003
  5. Pierre Rouleau
    Replies:
    4
    Views:
    770
    Pierre Rouleau
    Mar 7, 2004
Loading...

Share This Page